Re: [dm-devel] [PATCH V8 01/11] block: clone nr_integrity_segments and write_hint in blk_rq_prep_clone

2020-04-24 Thread Christoph Hellwig
ntegrity_segments. Also write_hint is from bio, it should have been > cloned too. > > So clone nr_integrity_segments and write_hint in blk_rq_prep_clone. Looks good, Reviewed-by: Christoph Hellwig -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH V8 02/11] block: add helper for copying request

2020-04-24 Thread Christoph Hellwig
On Fri, Apr 24, 2020 at 06:23:42PM +0800, Ming Lei wrote: > Add one new helper of blk_rq_copy_request() to copy request, and the helper > will be used in this patch for re-submitting request, so make it as a block > layer internal helper. Looks good, Reviewed-by: Christoph Hellwig --

[dm-devel] avoid the ->make_request_fn indirect for blk-mq drivers

2020-04-25 Thread Christoph Hellwig
Hi Jens, this small series avoids an indirect call for every submitted bio that eventually ends up being handled by blk-mq drivers. Let me know what you think. -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH 2/3] dm: remove the make_request_fn check in device_area_is_invalid

2020-04-25 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/md/dm-table.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 0a2cc197f62b4..8277b959e00bd 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -279,7 +279,6

[dm-devel] [PATCH 1/3] bcache: remove a duplicate ->make_request_fn assignment

2020-04-25 Thread Christoph Hellwig
The make_request_fn pointer should only be assigned by blk_alloc_queue. Fix a left over manual initialization. Fixes: ff27668ce809 ("bcache: pass the make_request methods to blk_queue_make_request") Signed-off-by: Christoph Hellwig --- drivers/md/bcache/request.c | 1 - 1 file

[dm-devel] [PATCH 3/3] block: bypass ->make_request_fn for blk-mq drivers

2020-04-25 Thread Christoph Hellwig
-by: Christoph Hellwig --- block/blk-core.c | 26 +- block/blk-mq.c | 4 ++-- drivers/md/dm.c| 3 +++ include/linux/blk-mq.h | 2 ++ 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 311596d5db

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

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

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

2020-05-25 Thread Christoph Hellwig
Switch dm to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig --- 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 --- a/drivers/md/dm.c +++ b/drivers/md

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

2020-05-25 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 --- drivers/md/bcache/request.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff

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

2020-05-25 Thread Christoph Hellwig
Switch dm to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig --- drivers/nvdimm/blk.c | 6 -- drivers/nvdimm/btt.c | 6 -- drivers/nvdimm/nd.h | 19 --- drivers/nvdimm/pmem.c | 6 -- 4 files changed, 12 insertions(+), 25 deletions

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

2020-05-25 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

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

2020-05-25 Thread Christoph Hellwig
Remove these now unused functions. Signed-off-by: Christoph Hellwig --- 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 9c101a0572ca2..3e89c7b37855a 100644 --- a

[dm-devel] [PATCH 13/16] block: add a blk_account_io_merge_bio helper

2020-05-25 Thread Christoph Hellwig
as there is no reason for that. Signed-off-by: Konstantin Khlebnikov [hch: rebased] Signed-off-by: Christoph Hellwig --- block/blk-core.c | 25 - block/blk-exec.c | 2 +- block/blk-mq.c | 2 +- block/blk.h | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-

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

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

[dm-devel] [PATCH 02/16] drbd: use bio_{start,end}_io_acct

2020-05-25 Thread Christoph Hellwig
Switch drbd to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_req.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index

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

2020-05-25 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

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

2020-05-25 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

[dm-devel] block I/O accounting improvements

2020-05-25 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

[dm-devel] [PATCH 01/16] block: add disk/bio-based accounting helpers

2020-05-25 Thread Christoph Hellwig
ned-off-by: Christoph Hellwig --- block/blk-core.c | 34 ++ include/linux/blkdev.h | 26 ++ 2 files changed, 60 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 77e57c2e8d602..8973104f88d90 100644 --- a/block/blk-co

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

2020-05-25 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 --- drivers/block/zram/zram_drv.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers

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

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

[dm-devel] [PATCH 03/16] rsxx: use bio_{start,end}_io_acct

2020-05-25 Thread Christoph Hellwig
Switch rsxx to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig --- drivers/block/rsxx/dev.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 8ffa8260dcafe..3ba07ab30c84f

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

2020-05-25 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 --- block/blk-core.c | 5 +++-- block/blk-merge.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/block

Re: [dm-devel] [PATCH 01/16] block: add disk/bio-based accounting helpers

2020-05-26 Thread Christoph Hellwig
On Mon, May 25, 2020 at 03:28:07PM +0300, Konstantin Khlebnikov wrote: > I think it would be better to leave this jiffies legacy nonsense in > callers and pass here request duration in nanoseconds. jiffies is what the existing interfaces uses. But now that they come from the start helper fixing t

[dm-devel] [PATCH 01/16] block: add disk/bio-based accounting helpers

2020-05-26 Thread Christoph Hellwig
ned-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- block/blk-core.c | 34 ++ include/linux/blkdev.h | 28 2 files changed, 62 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 77e57c2e8d602..897

[dm-devel] [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

[dm-devel] [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

[dm-devel] [PATCH 02/16] drbd: use bio_{start,end}_io_acct

2020-05-26 Thread Christoph Hellwig
Switch drbd to use the nicer bio accounting helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Konstantin Khlebnikov --- drivers/block/drbd/drbd_req.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers

[dm-devel] [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

[dm-devel] [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

[dm-devel] 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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [PATCH 03/16] rsxx: 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/block/rsxx/dev.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c

[dm-devel] [PATCH 13/16] block: add a blk_account_io_merge_bio helper

2020-05-26 Thread Christoph Hellwig
as there is no reason for that. Signed-off-by: Konstantin Khlebnikov [hch: rebased] Signed-off-by: Christoph Hellwig --- block/blk-core.c | 25 - block/blk-exec.c | 2 +- block/blk-mq.c | 2 +- block/blk.h | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-

[dm-devel] [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

[dm-devel] [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

Re: [dm-devel] [PATCH RFC 1/3] block: add flag 'nowait_requests' into queue limits

2020-06-02 Thread Christoph Hellwig
On Mon, Jun 01, 2020 at 03:37:09PM +0300, Konstantin Khlebnikov wrote: > Add flag for marking bio-based queues which support REQ_NOWAIT. > Set for all request based (mq) devices. > > Stacking device should set it after blk_set_stacking_limits() if method > make_request() itself doesn't delay reque

Re: [dm-devel] [PATCH RFC] block: blktrace framework cleanup

2020-06-23 Thread Christoph Hellwig
On Tue, Jun 23, 2020 at 08:27:52PM -0700, Chaitanya Kulkarni wrote: > There are many places where trace API accepts the struct request_queue* > parameter which can be derived from other function parameters. > > This patch removes the struct request queue parameter from the > blktrace framework

[dm-devel] [PATCH 08/14] block: bypass blkg_tryget_closest for the root_blkg

2020-06-27 Thread Christoph Hellwig
The root_blkg is only torn down at the very end of removing a queue. So in the I/O submission path is always has a life reference and we can just grab another one using blkg_get instead of doing a tryget and parent walk that won't lead anywhere. Signed-off-by: Christoph Hellwig --- bloc

[dm-devel] [PATCH 02/14] block: remove bio_disassociate_blkg

2020-06-27 Thread Christoph Hellwig
bio_disassociate_blkg has two callers, of which one immediately assigns a new value to >bi_blkg. Just open code the function in the two callers. Signed-off-by: Christoph Hellwig --- block/bio.c | 27 --- include/linux/bio.h | 2 -- 2 files changed, 8 inserti

[dm-devel] [PATCH 09/14] block: move the initial blkg lookup into blkg_tryget_closest

2020-06-27 Thread Christoph Hellwig
By moving the initial blkg lookup into blkg_tryget_closest we get a nicely self contained routines that does all the RCU locking. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/block

[dm-devel] [PATCH 10/14] blk-cgroup: remove the !bio->bi_blkg check in blkcg_bio_issue_check

2020-06-27 Thread Christoph Hellwig
This is purely a sanity check for grave programming errors. Remove it to simplify further work in this area. Signed-off-by: Christoph Hellwig --- include/linux/blk-cgroup.h | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/include/linux/blk-cgroup.h b/include

[dm-devel] [PATCH 12/14] blk-cgroup: move rcu locking from blkcg_bio_issue_check to blk_throtl_bio

2020-06-27 Thread Christoph Hellwig
The only thing in blkcg_bio_issue_check that needs to be under rcu_read_lock is blk_throtl_bio, so move the locking there. Signed-off-by: Christoph Hellwig --- block/blk-throttle.c | 3 ++- include/linux/blk-cgroup.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a

[dm-devel] [PATCH 14/14] blk-cgroup: remove a dead check in blk_throtl_bio

2020-06-27 Thread Christoph Hellwig
bios must have a valid block group by the time they are submitted. Signed-off-by: Christoph Hellwig --- block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 9d00f62c05ecdf..ad37043297ed58 100644 --- a/block

[dm-devel] [PATCH 06/14] block: move the bio cgroup associatation helpers to blk-cgroup.c

2020-06-27 Thread Christoph Hellwig
Keep the cgroup code together. Signed-off-by: Christoph Hellwig --- block/bio.c| 75 --- block/blk-cgroup.c | 103 - include/linux/blk-cgroup.h | 30 --- 3 files changed, 101 insertions(+), 107

[dm-devel] drive-by blk-cgroup cleanups

2020-06-27 Thread Christoph Hellwig
Hi all, while looking into another "project" I ended up wading through the blkcq code for research and found a bunch of lose ends. So here is a bunch of drive-by cleanups for the code. Diffstat: block/bio.c| 143 +-- block/blk-cgroup.c |

[dm-devel] [PATCH 13/14] blk-cgroup: remove blkcg_bio_issue_check

2020-06-27 Thread Christoph Hellwig
builds. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 34 +++ block/blk-core.c | 7 - block/blk-throttle.c | 5 ++-- block/blk.h| 2 ++ include/linux/blk-cgroup.h | 56 ++ 5 files

[dm-devel] [PATCH 04/14] block: merge __bio_associate_blkg into bio_associate_blkg_from_css

2020-06-27 Thread Christoph Hellwig
Merge __bio_associate_blkg into the only caller, which allows to slightly reduce the RCU crticial section and better explain the code flow. Signed-off-by: Christoph Hellwig --- block/bio.c | 45 + 1 file changed, 13 insertions(+), 32 deletions

[dm-devel] [PATCH 11/14] cgroup: unexport cgroup_rstat_updated

2020-06-27 Thread Christoph Hellwig
cgroup_rstat_updated is only used by core block code, no need to export it. Signed-off-by: Christoph Hellwig --- kernel/cgroup/rstat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index b6397a186ce9c8..d51175cedfca4f 100644 --- a/kernel/cgroup

[dm-devel] [PATCH 03/14] block: really clone the block cgroup in bio_clone_blkg_association

2020-06-27 Thread Christoph Hellwig
. Signed-off-by: Christoph Hellwig --- block/bio.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/bio.c b/block/bio.c index 8aef4460b32e0e..e1d01acce8070c 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1737,12 +1737,12 @@ EXPORT_SYMBOL_GPL(bio_associate_blkg

[dm-devel] [PATCH 05/14] block: move bio_associate_blkg_from_page to mm/page_io.c

2020-06-27 Thread Christoph Hellwig
bio_associate_blkg_from_page is a special purpose helper for swap bios that doesn't need access to bio internals. Move it to the swap code instead of having it in bio.c. Signed-off-by: Christoph Hellwig --- block/bio.c | 26 -- include/linux/bio.h

[dm-devel] [PATCH 07/14] block: merge blkg_lookup_create and __blkg_lookup_create

2020-06-27 Thread Christoph Hellwig
No good reason to keep these two functions split. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 49 +- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index bb0607bfd771cd

[dm-devel] [PATCH 01/14] dm: use bio_uninit instead of bio_disassociate_blkg

2020-06-27 Thread Christoph Hellwig
o the two callers of __send_empty_flush, so that they better pair with the bio_init calls used to initialize them. Signed-off-by: Christoph Hellwig --- drivers/md/dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 109e81f33

Re: [dm-devel] drive-by blk-cgroup cleanups

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 08:05:07AM +, Johannes Thumshirn wrote: > Btw what ever happened to > https://lore.kernel.org/r/20200430150356.35691-1-johannes.thumsh...@wdc.com? You'll have to ask Jens :) Note that your patch 2 overlaps with this series. I thik my version is a little nicer, given

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] 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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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 -

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

Re: [dm-devel] [PATCH 01/11] block: blktrace framework cleanup

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:04PM -0700, Chaitanya Kulkarni wrote: > This patch removes the extra variables from the trace events and > overall kernel blktrace framework. The removed members can easily be > extracted from the remaining argument which reduces the code > significantly and allows us

Re: [dm-devel] [PATCH 05/11] block: get rid of the trace rq insert wrapper

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:08PM -0700, Chaitanya Kulkarni wrote: > Get rid of the wrapper for trace_block_rq_insert() and call the function > directly. I'd mention blk_mq_sched_request_inserted instead of the tracepoint in the subject and commit message. Otherwise this looks fine. -- dm-devel

Re: [dm-devel] [PATCH 08/11] block: fix the comments in the trace event block.h

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:11PM -0700, Chaitanya Kulkarni wrote: > This is purely cleanup patch which fixes the comment in trace event > header for block_rq_issue() and block_rq_merge() events. > > Signed-off-by: Chaitanya Kulkarni Looks good, Reviewed-by: Christoph Hellwig

Re: [dm-devel] [PATCH 02/11] block: rename block_bio_merge class to block_bio

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:05PM -0700, Chaitanya Kulkarni wrote: > There are identical TRACE_EVENTS presents which can now take an > advantage of the block_bio_merge trace event class. > > This is a prep patch which renames block_bio_merge to block_bio so > that the next patches in this series

Re: [dm-devel] [PATCH 07/11] block: get rid of blk_trace_request_get_cgid()

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:10PM -0700, Chaitanya Kulkarni wrote: > Now that we have done cleanup we can safely get rid of the > blk_trace_request_get_cgid() and replace it with > blk_trace_bio_get_cgid(). To me the helper actually looks useful compared to open coding the check in a bunch of cal

Re: [dm-devel] [PATCH 09/11] block: remove unsed param in blk_fill_rwbs()

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:12PM -0700, Chaitanya Kulkarni wrote: > The last parameter for the function blk_fill_rwbs() was added in > 5782138e47 ("tracing/events: convert block trace points to > TRACE_EVENT()") in order to signal read request and use of that parameter > was replaced with using s

Re: [dm-devel] [PATCH 10/11] block: use block_bio class for getrq and sleeprq

2020-06-29 Thread Christoph Hellwig
On Mon, Jun 29, 2020 at 04:43:13PM -0700, Chaitanya Kulkarni wrote: > The only difference in block_get_rq and block_bio was the last param > passed __entry->nr_sector & bio->bi_iter.bi_size respectively. Since > that is not the case anymore replace block_get_rq class with block_bio > for block_get

Re: [dm-devel] 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 > >>

Re: [dm-devel] [PATCH 07/11] block: get rid of blk_trace_request_get_cgid()

2020-06-30 Thread Christoph Hellwig
On Wed, Jul 01, 2020 at 04:38:06AM +, Chaitanya Kulkarni wrote: > On 6/29/20 10:12 PM, Christoph Hellwig wrote: > > On Mon, Jun 29, 2020 at 04:43:10PM -0700, Chaitanya Kulkarni wrote: > >> Now that we have done cleanup we can safely get rid of the > >> blk_trace_req

Re: [dm-devel] [PATCH 10/11] block: use block_bio class for getrq and sleeprq

2020-06-30 Thread Christoph Hellwig
On Wed, Jul 01, 2020 at 04:45:03AM +, Chaitanya Kulkarni wrote: > On 6/29/20 10:13 PM, Christoph Hellwig wrote: > > On Mon, Jun 29, 2020 at 04:43:13PM -0700, Chaitanya Kulkarni wrote: > >> The only difference in block_get_rq and block_bio was the last param > >>

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] 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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

[dm-devel] [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

  1   2   3   4   5   6   7   8   9   10   >