From: Benlong Zhang <zhangbenlong@didichuxing.com>
To: <axboe@kernel.dk>
Cc: <tj@kernel.org>, <shli@kernel.org>, <david@fromorbit.com>,
<bfoster@redhat.com>, <linux-block@vger.kernel.org>
Subject: [PATCH] A tentative patch to bypass REQ_META in blk throttle
Date: Fri, 20 Apr 2018 18:06:01 +0800 [thread overview]
Message-ID: <20180420100554.GA23471@localhost> (raw)
One problem with cgwb is how fs should treat metadata bios.
For example in xfs, the log might be partially stuck in one
group, leaving threads in other groups waiting for too long.
Please refer to the linux-xfs discussion:
"[PATCH V2] xfs: implement cgroup writeback support"
One approach is to correctly tag bio->bi_css from within the
filesystems (for xfs log should be blkcg_root), and the other
is to skip them, but relies on REQ_META being set.
It works with xfs on a cgwb porting implementation to 3.10.0.
But really not sure about other filesystems...
---
block/blk-throttle.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index c5a1316..e2abf6e 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -2159,6 +2159,10 @@ bool blk_throtl_bio(struct request_queue *q, struct blkcg_gq *blkg,
if (bio_flagged(bio, BIO_THROTTLED) || !tg->has_rules[rw])
goto out;
+ /* bypass REQ_META for fs global resource */
+ if (bio->bi_opf & REQ_META)
+ goto out;
+
spin_lock_irq(q->queue_lock);
throtl_update_latency_buckets(td);
--
1.8.3.1
next reply other threads:[~2018-04-20 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-20 10:06 Benlong Zhang [this message]
2018-04-26 19:01 ` [PATCH] A tentative patch to bypass REQ_META in blk throttle Tejun Heo
2018-04-27 12:20 ` Brian Foster
2018-04-27 12:34 ` Tejun Heo
2018-05-02 2:20 ` Benlong Zhang
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=20180420100554.GA23471@localhost \
--to=zhangbenlong@didichuxing.com \
--cc=axboe@kernel.dk \
--cc=bfoster@redhat.com \
--cc=david@fromorbit.com \
--cc=linux-block@vger.kernel.org \
--cc=shli@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;
as well as URLs for NNTP newsgroup(s).