From: Hou Tao <houtao1@huawei.com>
To: <linux-block@vger.kernel.org>
Cc: <axboe@kernel.dk>, <tj@kernel.org>
Subject: [PATCH] block: use put_io_context_active() to disassociate bio from a task
Date: Fri, 3 Mar 2017 15:01:10 +0800 [thread overview]
Message-ID: <1488524470-570-1-git-send-email-houtao1@huawei.com> (raw)
bio_associate_current() invokes get_io_context_active() to tell
CFQ scheduler that the current io_context is still issuing IOs
by increasing active_ref. When the bio is done, we also need
to invoke put_io_context_active() to decrease active_ref else
the associated io_context will always be active.
Signed-off-by: Hou Tao <houtao1@huawei.com>
---
block/bio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bio.c b/block/bio.c
index 5eec5e0..d8ed36f 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -2072,7 +2072,7 @@ EXPORT_SYMBOL_GPL(bio_associate_current);
void bio_disassociate_task(struct bio *bio)
{
if (bio->bi_ioc) {
- put_io_context(bio->bi_ioc);
+ put_io_context_active(bio->bi_ioc);
bio->bi_ioc = NULL;
}
if (bio->bi_css) {
--
2.5.0
next reply other threads:[~2017-03-03 7:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 7:01 Hou Tao [this message]
2017-03-03 19:12 ` [PATCH] block: use put_io_context_active() to disassociate bio from a task Tejun Heo
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=1488524470-570-1-git-send-email-houtao1@huawei.com \
--to=houtao1@huawei.com \
--cc=axboe@kernel.dk \
--cc=linux-block@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox