* [PATCH] blkcg: add plugging support for punt bio
@ 2020-08-06 13:54 Xianting Tian
2020-08-06 14:30 ` Tejun Heo
2020-08-06 15:16 ` Jens Axboe
0 siblings, 2 replies; 8+ messages in thread
From: Xianting Tian @ 2020-08-06 13:54 UTC (permalink / raw)
To: tj, axboe; +Cc: cgroups, linux-block, linux-kernel
Try to merge continuous bio to current task's plug fisrt.
Signed-off-by: Xianting Tian <xianting_tian@126.com>
---
block/blk-cgroup.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0ecc897..fe5d361 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -122,6 +122,7 @@ static void blkg_async_bio_workfn(struct work_struct *work)
async_bio_work);
struct bio_list bios = BIO_EMPTY_LIST;
struct bio *bio;
+ struct blk_plug plug;
/* as long as there are pending bios, @blkg can't go away */
spin_lock_bh(&blkg->async_bio_lock);
@@ -129,8 +130,10 @@ static void blkg_async_bio_workfn(struct work_struct *work)
bio_list_init(&blkg->async_bios);
spin_unlock_bh(&blkg->async_bio_lock);
+ blk_start_plug(&plug);
while ((bio = bio_list_pop(&bios)))
submit_bio(bio);
+ blk_finish_plug(&plug);
}
/**
--
1.8.3.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] blkcg: add plugging support for punt bio
@ 2020-08-06 14:30 ` Tejun Heo
0 siblings, 0 replies; 8+ messages in thread
From: Tejun Heo @ 2020-08-06 14:30 UTC (permalink / raw)
To: Xianting Tian; +Cc: axboe, cgroups, linux-block, linux-kernel
On Thu, Aug 06, 2020 at 09:54:42AM -0400, Xianting Tian wrote:
> Try to merge continuous bio to current task's plug fisrt.
>
> Signed-off-by: Xianting Tian <xianting_tian@126.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks!
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] blkcg: add plugging support for punt bio
@ 2020-08-06 14:30 ` Tejun Heo
0 siblings, 0 replies; 8+ messages in thread
From: Tejun Heo @ 2020-08-06 14:30 UTC (permalink / raw)
To: Xianting Tian
Cc: axboe-tSWWG44O7X1aa/9Udqfwiw, cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-block-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Thu, Aug 06, 2020 at 09:54:42AM -0400, Xianting Tian wrote:
> Try to merge continuous bio to current task's plug fisrt.
>
> Signed-off-by: Xianting Tian <xianting_tian-KN7UnAbNpbg@public.gmane.org>
Acked-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Thanks!
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] blkcg: add plugging support for punt bio
2020-08-06 13:54 [PATCH] blkcg: add plugging support for punt bio Xianting Tian
2020-08-06 14:30 ` Tejun Heo
@ 2020-08-06 15:16 ` Jens Axboe
[not found] ` <42b939c2.e08.173c6f79af9.Coremail.xianting_tian@126.com>
1 sibling, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2020-08-06 15:16 UTC (permalink / raw)
To: Xianting Tian, tj; +Cc: cgroups, linux-block, linux-kernel
On 8/6/20 7:54 AM, Xianting Tian wrote:
> Try to merge continuous bio to current task's plug fisrt.
The patch looks fine to me, but I'd really like to see a bit more
changelog here. The commit message should explain why the change
is made, rather it's a very brief explanation of what it does.
If the bio list is contiguous, then we do the plugging to improve
merging at the lower level. You probably ran into a case where
you saw sub-optimal merging? And now the performance is better
with the patch? How much?
--
Jens Axboe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-09-09 1:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 13:54 [PATCH] blkcg: add plugging support for punt bio Xianting Tian
2020-08-06 14:30 ` Tejun Heo
2020-08-06 14:30 ` Tejun Heo
2020-08-06 15:16 ` Jens Axboe
[not found] ` <42b939c2.e08.173c6f79af9.Coremail.xianting_tian@126.com>
[not found] ` <1ded6246.2c67.17458ce4300.Coremail.xianting_tian@126.com>
[not found] ` <65e1e040da644ed9a05edd166d06b5e3@h3c.com>
2020-09-08 18:03 ` Tejun Heo
2020-09-08 18:03 ` Tejun Heo
2020-09-09 1:22 ` Tianxianting
2020-09-09 1:22 ` Tianxianting
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.