[PATCH 08/16] zram: nvdimm: use bio_{start,end}_io_acct and disk_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Switch zram to use the nicer bio accounting helpers, and as part of that ensure each bio is counted as a single I/O request. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- drivers/block/zram/zram_drv.c | 24 ++-- 1 file changed, 10 insertions(+), 14

[PATCH 09/16] block: remove generic_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Remove these now unused functions. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- block/bio.c | 39 --- include/linux/bio.h | 6 -- 2 files changed, 45 deletions(-) diff --git a/block/bio.c b/block/bio.c index

[PATCH 05/16] bcache: use bio_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Switch bcache to use the nicer bio accounting helpers, and call the routines where we also sample the start time to give coherent accounting results. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov Acked-by: Coly Li --- drivers/md/bcache/request.c | 18

[PATCH 12/16] block: account merge of two requests

2020-05-26 Thread Christoph Hellwig
From: Konstantin Khlebnikov Also rename blk_account_io_merge() into blk_account_io_merge_request() to distinguish it from merging request and bio. Signed-off-by: Konstantin Khlebnikov [hch: rebased] Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 12 +--- 1 file changed, 5

[PATCH 14/16] block: remove rcu_read_lock() from part_stat_lock()

2020-05-26 Thread Christoph Hellwig
] Signed-off-by: Christoph Hellwig --- block/genhd.c | 11 --- include/linux/part_stat.h | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 3e7df0a3e6bb0..1a76593276644 100644 --- a/block/genhd.c +++ b/block/genhd.c

[PATCH 10/16] block: move update_io_ticks to blk-core.c

2020-05-26 Thread Christoph Hellwig
All callers are in blk-core.c, so move update_io_ticks over. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- block/bio.c | 16 block/blk-core.c | 15 +++ block/blk.h | 1 - 3 files changed, 15 insertions(+), 17 deletions(-) diff

[PATCH 11/16] block: always use a percpu variable for disk stats

2020-05-26 Thread Christoph Hellwig
percpu variables have a perfectly fine working stub implementation for UP kernels, so use that. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- block/blk.h | 2 +- block/genhd.c | 12 +++-- block/partitions/core.c | 5 ++-- include

block I/O accounting improvements v2

2020-05-26 Thread Christoph Hellwig
Hi Jens, they series contains various improvement for block I/O accounting. The first bunch of patches switch the bio based drivers to better accounting helpers compared to the current mess. The end contains a fix and various performanc improvements. Most of this comes from a series Konstantin

[PATCH 04/16] lightnvm/pblk: use bio_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Switch rsxx to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- drivers/lightnvm/pblk-cache.c | 8 +++- drivers/lightnvm/pblk-read.c | 11 --- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers

[PATCH 15/16] block: use __this_cpu_add() instead of access by smp_processor_id()

2020-05-26 Thread Christoph Hellwig
From: Konstantin Khlebnikov Most architectures have fast path to access percpu for current cpu. The required preempt_disable() is provided by part_stat_lock(). Signed-off-by: Konstantin Khlebnikov [hch: rebased] Signed-off-by: Christoph Hellwig --- include/linux/part_stat.h | 2 +- 1 file

[PATCH 07/16] nvdimm: use bio_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Switch dm to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- drivers/nvdimm/blk.c | 6 -- drivers/nvdimm/btt.c | 6 -- drivers/nvdimm/nd.h | 19 --- drivers/nvdimm/pmem.c | 6 -- 4 files changed

[PATCH 06/16] dm: use bio_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Switch dm to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- drivers/md/dm.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index f215b86664484..3f39fa1ac756e 100644

[PATCH 16/16] block: reduce part_stat_lock() scope

2020-05-26 Thread Christoph Hellwig
We only need the stats lock (aka preempt_disable()) for updating the states, not for looking up or dropping the hd_struct reference. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- block/blk-core.c | 5 +++-- block/blk-merge.c | 3 ++- 2 files changed, 5 insertions

[PATCH 07/20] umem: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/umem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 1e2aa5ae27963c..5498f1cf36b3fe 100644

[PATCH 20/20] block: remove direct_make_request

2020-06-29 Thread Christoph Hellwig
Now that submit_bio_noacct has a decent blk-mq fast path there is no more need for this bypass. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 28 drivers/md/dm.c | 5 + drivers/nvme/host/multipath.c | 2 +- include/linux

[PATCH 01/20] nfblock: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- arch/m68k/emu/nfblock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c index c3a630440512e9..87e8b1700acd28

[PATCH 04/20] null_blk: stop using ->queuedata for bio mode

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/null_blk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 82259242b9b5c9

[PATCH 15/20] block: remove the nr_sectors variable in generic_make_request_checks

2020-06-29 Thread Christoph Hellwig
The variable is only used once, so just open code the bio_sector() there. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 37435d0d433564..28f60985dc75cc 100644 --- a/block/blk

[PATCH 03/20] drbd: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 1 - drivers/block/drbd/drbd_req.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c b/drivers

[PATCH 17/20] block: rename generic_make_request to submit_bio_noacct

2020-06-29 Thread Christoph Hellwig
generic_make_request has always been very confusingly misnamed, so rename it to submit_bio_noacct to make it clear that it is submit_bio minus accounting and a few checks. Signed-off-by: Christoph Hellwig --- Documentation/block/biodoc.rst| 2 +- .../fault-injection/fault

[PATCH 16/20] block: move ->make_request_fn to struct block_device_operations

2020-06-29 Thread Christoph Hellwig
derived pretty trivially from the bio. Signed-off-by: Christoph Hellwig --- Documentation/block/biodoc.rst| 2 +- .../block/writeback_cache_control.rst | 2 +- arch/m68k/emu/nfblock.c | 5 +- arch/xtensa/platforms/iss/simdisk.c | 5

[PATCH 19/20] block: shortcut __submit_bio_noacct for blk-mq drivers

2020-06-29 Thread Christoph Hellwig
For blk-mq drivers bios can only be inserted for the same queue. So bypass the complicated sorting logic in __submit_bio_noacct with a blk-mq simpler submission helper. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 50 +--- 1 file changed

[PATCH 08/20] zram: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index

[PATCH 05/20] ps3vram: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/ps3vram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 821d4d8b1d763e..5a1d1d137c7248

[PATCH 12/20] block: remove the request_queue argument from blk_queue_split

2020-06-29 Thread Christoph Hellwig
The queue can be trivially derived from the bio, so pass one less argument. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 21 ++--- block/blk-mq.c| 2 +- block/blk.h | 3 +-- drivers/block/drbd/drbd_req.c | 2

[PATCH 10/20] dm: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index e44473fe0f4873..c8d91f271c272e 100644 --- a/drivers/md

[PATCH 13/20] block: tidy up a warning in bio_check_ro

2020-06-29 Thread Christoph Hellwig
The "generic_make_request: " prefix has no value, and will soon become stale. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 76cfd5709f66cd..95dca74534ff73 100644 -

[PATCH 18/20] block: refator submit_bio_noacct

2020-06-29 Thread Christoph Hellwig
Split out a __submit_bio_noacct helper for the actual de-recursion algorithm, and simplify the loop by using a continue when we can't enter the queue for a bio. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 131 +-- 1 file change

[PATCH 14/20] block: remove the NULL queue check in generic_make_request_checks

2020-06-29 Thread Christoph Hellwig
All registers disks must have a valid queue pointer, so don't bother to log a warning for that case. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 95dca7453

[PATCH 09/20] bcache: stop setting ->queuedata

2020-06-29 Thread Christoph Hellwig
Nothing in bcache actually uses the ->queuedata field. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 2014016f9a60d3..21aa168113d30b 100644 --- a/drivers/md/bca

rename ->make_request_fn and move it to the block_device_operations

2020-06-29 Thread Christoph Hellwig
Hi Jens, this series moves the make_request_fn method into block_device_operations with the much more descriptive ->submit_bio name. It then also gives generic_make_request a more descriptive name, and further optimize the path to issue to blk-mq, removing the need for the direct_make_request byp

[PATCH 06/20] rsxx: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/dev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 3ba07ab30c84f5

[PATCH 11/20] fs: remove a weird comment in submit_bh_wbc

2020-06-29 Thread Christoph Hellwig
All bios can get remapped if submitted to partitions. No need to comment on that. Signed-off-by: Christoph Hellwig --- fs/buffer.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 64fe82ec65ff1f..2725ebbcfdc246 100644 --- a/fs/buffer.c +++ b/fs/buffer.c

[PATCH 02/20] simdisk: stop using ->queuedata

2020-06-29 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- arch/xtensa/platforms/iss/simdisk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c

Re: rename ->make_request_fn and move it to the block_device_operations

2020-06-30 Thread Christoph Hellwig
On Tue, Jun 30, 2020 at 09:43:31AM -0600, Jens Axboe wrote: > On 6/30/20 7:57 AM, Jens Axboe wrote: > > On 6/29/20 1:39 PM, Christoph Hellwig wrote: > >> Hi Jens, > >> > >> this series moves the make_request_fn method into block_device_operations > >>

[PATCH 11/20] fs: remove a weird comment in submit_bh_wbc

2020-07-01 Thread Christoph Hellwig
All bios can get remapped if submitted to partitions. No need to comment on that. Signed-off-by: Christoph Hellwig --- fs/buffer.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 64fe82ec65ff1f..2725ebbcfdc246 100644 --- a/fs/buffer.c +++ b/fs/buffer.c

[PATCH 13/20] block: tidy up a warning in bio_check_ro

2020-07-01 Thread Christoph Hellwig
The "generic_make_request: " prefix has no value, and will soon become stale. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 76cfd5709f66cd..95dca74534ff73 100644 -

[PATCH 17/20] block: rename generic_make_request to submit_bio_noacct

2020-07-01 Thread Christoph Hellwig
generic_make_request has always been very confusingly misnamed, so rename it to submit_bio_noacct to make it clear that it is submit_bio minus accounting and a few checks. Signed-off-by: Christoph Hellwig --- Documentation/block/biodoc.rst| 2 +- .../fault-injection/fault

[PATCH 10/20] dm: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index e44473fe0f4873..c8d91f271c272e 100644 --- a/drivers/md

[PATCH 04/20] null_blk: stop using ->queuedata for bio mode

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/null_blk_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/null_blk_main.c b/drivers/block/null_blk_main.c index 82259242b9b5c9

[PATCH 09/20] bcache: stop setting ->queuedata

2020-07-01 Thread Christoph Hellwig
Nothing in bcache actually uses the ->queuedata field. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/super.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 2014016f9a60d3..21aa168113d30b 100644 --- a/drivers/md/bca

[PATCH 18/20] block: refator submit_bio_noacct

2020-07-01 Thread Christoph Hellwig
Split out a __submit_bio_noacct helper for the actual de-recursion algorithm, and simplify the loop by using a continue when we can't enter the queue for a bio. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 143 +-- 1 file change

[PATCH 08/20] zram: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index

[PATCH 15/20] block: remove the nr_sectors variable in generic_make_request_checks

2020-07-01 Thread Christoph Hellwig
The variable is only used once, so just open code the bio_sector() there. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 37435d0d433564..28f60985dc75cc 100644 --- a/block/blk

[PATCH 19/20] block: shortcut __submit_bio_noacct for blk-mq drivers

2020-07-01 Thread Christoph Hellwig
For blk-mq drivers bios can only be inserted for the same queue. So bypass the complicated sorting logic in __submit_bio_noacct with a blk-mq simpler submission helper. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 30 ++ 1 file changed, 30 insertions

rename ->make_request_fn and move it to the block_device_operations v2

2020-07-01 Thread Christoph Hellwig
Hi Jens, this series moves the make_request_fn method into block_device_operations with the much more descriptive ->submit_bio name. It then also gives generic_make_request a more descriptive name, and further optimize the path to issue to blk-mq, removing the need for the direct_make_request byp

[PATCH 07/20] umem: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/umem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 1e2aa5ae27963c..5498f1cf36b3fe 100644

[PATCH 14/20] block: remove the NULL queue check in generic_make_request_checks

2020-07-01 Thread Christoph Hellwig
All registers disks must have a valid queue pointer, so don't bother to log a warning for that case. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 95dca7453

[PATCH 16/20] block: move ->make_request_fn to struct block_device_operations

2020-07-01 Thread Christoph Hellwig
derived pretty trivially from the bio. Signed-off-by: Christoph Hellwig --- Documentation/block/biodoc.rst| 2 +- .../block/writeback_cache_control.rst | 2 +- arch/m68k/emu/nfblock.c | 5 +- arch/xtensa/platforms/iss/simdisk.c | 5

[PATCH 03/20] drbd: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_main.c | 1 - drivers/block/drbd/drbd_req.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_main.c b/drivers

[PATCH 20/20] block: remove direct_make_request

2020-07-01 Thread Christoph Hellwig
Now that submit_bio_noacct has a decent blk-mq fast path there is no more need for this bypass. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 28 drivers/md/dm.c | 5 + drivers/nvme/host/multipath.c | 2 +- include/linux

[PATCH 12/20] block: remove the request_queue argument from blk_queue_split

2020-07-01 Thread Christoph Hellwig
The queue can be trivially derived from the bio, so pass one less argument. Signed-off-by: Christoph Hellwig --- block/blk-merge.c | 21 ++--- block/blk-mq.c| 2 +- block/blk.h | 3 +-- drivers/block/drbd/drbd_req.c | 2

[PATCH 02/20] simdisk: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- arch/xtensa/platforms/iss/simdisk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c

[PATCH 01/20] nfblock: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- arch/m68k/emu/nfblock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/m68k/emu/nfblock.c

[PATCH 05/20] ps3vram: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/ps3vram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index 821d4d8b1d763e..5a1d1d137c7248

[PATCH 06/20] rsxx: stop using ->queuedata

2020-07-01 Thread Christoph Hellwig
Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/dev.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 3ba07ab30c84f5

Re: [PATCH 18/20] block: refator submit_bio_noacct

2020-07-02 Thread Christoph Hellwig
On Thu, Jul 02, 2020 at 10:10:10AM -0400, Qian Cai wrote: > On Mon, Jun 29, 2020 at 09:39:45PM +0200, Christoph Hellwig wrote: > > Split out a __submit_bio_noacct helper for the actual de-recursion > > algorithm, and simplify the loop by using a continue when we can't > >

Re: [PATCH v2 11/12] PM, libnvdimm: Add 'mem-quiet' state and callback for firmware activation

2020-07-09 Thread Christoph Hellwig
On Mon, Jul 06, 2020 at 06:59:32PM -0700, Dan Williams wrote: > The runtime firmware activation capability of Intel NVDIMM devices > requires memory transactions to be disabled for 100s of microseconds. > This timeout is large enough to cause in-flight DMA to fail and other > application detectable

Re: [PATCH 1/9] iomap: Fix misplaced page flushing

2020-08-27 Thread Christoph Hellwig
serts. Otherwise looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 5/9] iomap: Support arbitrarily many blocks per page

2020-08-27 Thread Christoph Hellwig
pty line after the VM_BUG_ON_PGFLAGS assert to keep the function readable? Maybe also add a comment on the assert, as it isn't totally obvious. Otherwise looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org

Re: [PATCH 6/9] iomap: Convert read_count to byte count

2020-08-27 Thread Christoph Hellwig
> @@ -269,20 +263,17 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, > loff_t length, void *data, > if (ctx->bio && bio_end_sector(ctx->bio) == sector) > is_contig = true; > > - > /* > - * If we start a new segment we need to increase the read count, and w

Re: [PATCH 7/9] iomap: Convert write_count to byte count

2020-08-27 Thread Christoph Hellwig
re involved. Looks good (module the field naming as comment on the previous patch): Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 9/9] iomap: Change calling convention for zeroing

2020-08-27 Thread Christoph Hellwig
On Tue, Aug 25, 2020 at 03:23:55PM -0700, Darrick J. Wong wrote: > Sorry for my ultra-slow response to this. The u64 length seems ok to me > (or uint64_t, I don't care all /that/ much), but using loff_t as a > return type bothers me because I see that and think that this function > is returning a

Re: [PATCH 8/9] iomap: Convert iomap_write_end types

2020-08-27 Thread Christoph Hellwig
ver wants to support a page size larger than 2GB. > > Signed-off-by: Matthew Wilcox (Oracle) Looks good: Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

[PATCH 1/9] Documentation/filesystems/locking.rst: remove an incorrect sentence

2020-09-01 Thread Christoph Hellwig
unlock_native_capacity is never called from check_disk_change(), and while revalidate_disk can be called from it, it can also be called from two other places at the moment. Signed-off-by: Christoph Hellwig --- Documentation/filesystems/locking.rst | 3 --- 1 file changed, 3 deletions(-) diff

remove revalidate_disk()

2020-09-01 Thread Christoph Hellwig
Hi Jens, this series removes the revalidate_disk() function, which has been a really odd duck in the last years. The prime reason why most people use it is because it propagates a size change from the gendisk to the block_device structure. But it also calls into the rather ill defined ->revalida

[PATCH 4/9] block: add a new revalidate_disk_size helper

2020-09-01 Thread Christoph Hellwig
_size helper that just performs the update of the block device size from the gendisk one, and switch all drivers that do not implement ->revalidate_disk to use the new helper instead of revalidate_disk() Signed-off-by: Christoph Hellwig --- drivers/block/rbd.c | 2 +- drivers/block/r

[PATCH 3/9] block: rename bd_invalidated

2020-09-01 Thread Christoph Hellwig
Replace bd_invalidate with a new BDEV_NEED_PART_SCAN flag in a bd_flags variable to better describe the condition. Signed-off-by: Christoph Hellwig --- block/genhd.c | 2 +- drivers/block/nbd.c | 8 fs/block_dev.c| 10 +- include/linux

[PATCH 2/9] block: don't clear bd_invalidated in check_disk_size_change

2020-09-01 Thread Christoph Hellwig
bd_invalidated event. revalidate_disk() on the other hand is mostly used to propagate a size update from the gendisk to the block device, which is entirely unrelated. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs

[PATCH 7/9] sd: open code revalidate_disk

2020-09-01 Thread Christoph Hellwig
Instead of calling revalidate_disk just do the work directly by calling sd_revalidate_disk, and revalidate_disk_size where needed. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi

[PATCH 9/9] block: remove revalidate_disk()

2020-09-01 Thread Christoph Hellwig
Remove the now unused helper. Signed-off-by: Christoph Hellwig --- drivers/md/md.h | 2 +- fs/block_dev.c| 19 --- include/linux/genhd.h | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/md/md.h b/drivers/md/md.h index d9c4e6b7e9398d

[PATCH 6/9] nvme: opencode revalidate_disk in nvme_validate_ns

2020-09-01 Thread Christoph Hellwig
called from the open code when first opening the device. Which is of course totally pointless as we have a valid size since the initial scan, and will get an updated view through the asynchronous notifiation everytime the size changes. Signed-off-by: Christoph Hellwig --- drivers/nvme/host/core.

[PATCH 8/9] nvdimm: simplify revalidate_disk handling

2020-09-01 Thread Christoph Hellwig
remove the revalidate_disk methods given that it can only be triggered from add_disk, which is right before the manual calls. Signed-off-by: Christoph Hellwig --- drivers/nvdimm/blk.c | 3 +-- drivers/nvdimm/btt.c | 3 +-- drivers/nvdimm/bus.c | 9 +++-- drivers/nvdimm/nd.h | 2 +- drivers

[PATCH 5/9] block: use revalidate_disk_size in set_capacity_revalidate_and_notify

2020-09-01 Thread Christoph Hellwig
Only virtio_blk and xen-blkfront set the revalidate argument to true, and both do not implement the ->revalidate_disk method. So switch to the helper that just updates the size instead. Signed-off-by: Christoph Hellwig --- block/genhd.c | 7 +++ include/linux/genhd.h | 4 ++--

Re: [PATCH 2/2] xfs: don't update mtime on COW faults

2020-09-06 Thread Christoph Hellwig
> +static bool > +xfs_is_write_fault( > + struct vm_fault *vmf) > +{ > + return vmf->flags & FAULT_FLAG_WRITE && vmf->vma->vm_flags & VM_SHARED; > +} This function does not look xfs specific at all. Why isn't it it in fs.h? While we're at it the name sounds rather generic, and th

Re: [PATCH v2 6/9] iomap: Convert read_count to read_bytes_pending

2020-09-10 Thread Christoph Hellwig
nvolved. > > Signed-off-by: Matthew Wilcox (Oracle) Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH v2 5/9] iomap: Support arbitrarily many blocks per page

2020-09-10 Thread Christoph Hellwig
more than 4kB > per page. Add a few debugging assertions. > > Signed-off-by: Matthew Wilcox (Oracle) > Reviewed-by: Dave Chinner Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To uns

Re: [PATCH v2 9/9] iomap: Change calling convention for zeroing

2020-09-10 Thread Christoph Hellwig
ally take > advantage of it if there's a larger contiguous area. Looks good, Reviewed-by: Christoph Hellwig ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 06/17] mm: pass the vmem_altmap to arch_remove_memory and __remove_pages

2017-12-19 Thread Christoph Hellwig
On Fri, Dec 15, 2017 at 06:04:37PM -0800, Dan Williams wrote: > On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > > We can just pass this on instead of having to do a radix tree lookup > > without proper locking 2 levels into the callchain. > > > > Signed-of

Re: [PATCH 14/17] memremap: simplify duplicate region handling in devm_memremap_pages

2017-12-19 Thread Christoph Hellwig
On Sun, Dec 17, 2017 at 09:34:11AM -0800, Dan Williams wrote: > This is not racy, we'll catch the error on insert, and I think the > extra debug information is useful for debugging a broken memory map or > alignment math. We can check for -ЕEXIST and print the warning, but it's a weird pattern for

Re: [PATCH 16/17] memremap: change devm_memremap_pages interface to use struct dev_pagemap

2017-12-19 Thread Christoph Hellwig
On Sun, Dec 17, 2017 at 10:51:56AM -0800, Dan Williams wrote: > On Fri, Dec 15, 2017 at 6:09 AM, Christoph Hellwig wrote: > > From: Logan Gunthorpe > > > > This new interface is similar to how struct device (and many others) > > work. The caller initializes a '

[PATCH 01/17] memremap: provide stubs for vmem_altmap_offset and vmem_altmap_free

2017-12-28 Thread Christoph Hellwig
Currently all calls to those functions are eliminated by the compiler when CONFIG_ZONE_DEVICE is not set, but this soon won't be the case. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- include/linux/memremap.h | 18 ++ 1 file changed, 14 insertions(

[PATCH 02/17] mm: don't export arch_add_memory

2017-12-28 Thread Christoph Hellwig
Only x86_64 and sh export this symbol, and it is not used by any modular code. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- arch/sh/mm/init.c | 1 - arch/x86/mm/init_64.c | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index

[PATCH 03/17] mm: don't export __add_pages

2017-12-28 Thread Christoph Hellwig
This function isn't used by any modules, and is only to be called from core MM code. This includes the calls for the add_pages wrapper that might be inlined. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- mm/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --

revamp vmem_altmap / dev_pagemap handling V3

2017-12-28 Thread Christoph Hellwig
Hi all, this series started with two patches from Logan that now are in the middle of the series to kill the memremap-internal pgmap structure and to redo the dev_memreamp_pages interface to be better suitable for future PCI P2P uses. I reviewed them and noticed that there isn't really any good r

[PATCH 04/17] mm: pass the vmem_altmap to arch_add_memory and __add_pages

2017-12-28 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking 2 levels into the callchain. Signed-off-by: Christoph Hellwig --- arch/ia64/mm/init.c| 5 +++-- arch/powerpc/mm/mem.c | 5 +++-- arch/s390/mm/init.c| 5 +++-- arch/sh

[PATCH 08/17] mm: pass the vmem_altmap to memmap_init_zone

2017-12-28 Thread Christoph Hellwig
Pass the vmem_altmap two levels down instead of needing a lookup. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- arch/ia64/mm/init.c| 9 + include/linux/memory_hotplug.h | 2 +- include/linux/mm.h | 4 ++-- kernel/memremap.c | 2

[PATCH 06/17] mm: pass the vmem_altmap to arch_remove_memory and __remove_pages

2017-12-28 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking 2 levels into the callchain. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- arch/ia64/mm/init.c| 4 ++-- arch/powerpc/mm/mem.c | 6 ++ arch/s390/mm/init.c

[PATCH 05/17] mm: pass the vmem_altmap to vmemmap_populate

2017-12-28 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking a few levels into the callchain. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- arch/arm64/mm/mmu.c| 6 -- arch/ia64/mm/discontig.c | 3 ++- arch/powerpc/mm

[PATCH 07/17] mm: pass the vmem_altmap to vmemmap_free

2017-12-28 Thread Christoph Hellwig
We can just pass this on instead of having to do a radix tree lookup without proper locking a few levels into the callchain. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- arch/arm64/mm/mmu.c| 3 +- arch/ia64/mm/discontig.c | 3 +- arch/powerpc/mm/init_64.c

[PATCH 11/17] mm: move get_dev_pagemap out of line

2017-12-28 Thread Christoph Hellwig
This is a pretty big function, which should be out of line in general, and a no-op stub if CONFIG_ZONE_DEVICЕ is not set. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Dan Williams --- include/linux/memremap.h | 39 --- kernel

[PATCH 17/17] memremap: merge find_dev_pagemap into get_dev_pagemap

2017-12-28 Thread Christoph Hellwig
There is only one caller of the trivial function find_dev_pagemap left, so just merge it into the caller. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- kernel/memremap.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/kernel/memremap.c b/kernel

[PATCH 15/17] memremap: drop private struct page_map

2017-12-28 Thread Christoph Hellwig
r a more generally useful 'devm_memeremap_pages' interface. Signed-off-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- include/linux/memremap.h | 5 ++-- kernel/memremap.c| 68 ++-- mm/hmm.c

[PATCH 12/17] mm: optimize dev_pagemap reference counting around get_dev_pagemap

2017-12-28 Thread Christoph Hellwig
: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Dan Williams --- kernel/memremap.c | 17 + mm/gup.c | 7 +-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index 3df6cd4ffb40..891c77487a6a 100644 --- a

[PATCH 09/17] mm: split altmap memory map allocation from normal case

2017-12-28 Thread Christoph Hellwig
No functional changes, just untangling the call chain and document why the altmap is passed around the hotplug code. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Dan Williams --- arch/powerpc/mm/init_64.c | 5 - arch/x86/mm/init_64.c | 5 - include

[PATCH 10/17] mm: merge vmem_altmap_alloc into altmap_alloc_block_buf

2017-12-28 Thread Christoph Hellwig
There is no clear separation between the two, so merge them. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe Reviewed-by: Dan Williams --- mm/sparse-vmemmap.c | 45 - 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/mm

[PATCH 16/17] memremap: change devm_memremap_pages interface to use struct dev_pagemap

2017-12-28 Thread Christoph Hellwig
this way application specific members can be stored in a containing struct. This will be used by the P2P infrastructure and HMM could probably be cleaned up to use it as well (instead of having it's own, similar 'hmm_devmem_pages_create' function). Signed-off-by: Logan Gunthorp

[PATCH 14/17] memremap: simplify duplicate region handling in devm_memremap_pages

2017-12-28 Thread Christoph Hellwig
__radix_tree_insert already checks for duplicates and returns -EEXIST in that case, so remove the duplicate (and racy) duplicates check. Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe --- kernel/memremap.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/kernel

[PATCH 13/17] memremap: remove to_vmem_altmap

2017-12-28 Thread Christoph Hellwig
All callers are gone now. Signed-off-by: Christoph Hellwig Reviewed-by: Dan Williams --- include/linux/memremap.h | 9 - kernel/memremap.c| 26 -- 2 files changed, 35 deletions(-) diff --git a/include/linux/memremap.h b/include/linux/memremap.h index

Re: [PATCH v4 01/18] mm, dax: introduce pfn_t_special()

2018-01-04 Thread Christoph Hellwig
On Sat, Dec 23, 2017 at 04:56:06PM -0800, Dan Williams wrote: > In support of removing the VM_MIXEDMAP indication from DAX VMAs, > introduce pfn_t_special() for drivers to indicate that _PAGE_SPECIAL > should be used for DAX ptes. This also helps identify drivers like > dccssblk that only want to u

<    1   2   3   4   5   6   7   8   9   10   >