From: Xianting Tian <xianting_tian@126.com>
To: tj@kernel.org, axboe@kernel.dk
Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] blkcg: add plugging support for punt bio
Date: Thu, 6 Aug 2020 09:54:42 -0400 [thread overview]
Message-ID: <1596722082-31817-1-git-send-email-xianting_tian@126.com> (raw)
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
next reply other threads:[~2020-08-06 17:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 13:54 Xianting Tian [this message]
2020-08-06 14:30 ` [PATCH] blkcg: add plugging support for punt bio 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1596722082-31817-1-git-send-email-xianting_tian@126.com \
--to=xianting_tian@126.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.