From: Jeff Moyer <jmoyer@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Jens Axboe <axboe@fb.com>, linux-block@vger.kernel.org
Subject: Re: [PATCH] cfq: priority boost on meta/prio marked IO
Date: Thu, 09 Jun 2016 17:47:56 -0400 [thread overview]
Message-ID: <x49twh2vxtf.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <5759E177.9040307@kernel.dk> (Jens Axboe's message of "Thu, 9 Jun 2016 15:36:55 -0600")
Jens Axboe <axboe@kernel.dk> writes:
> On 06/09/2016 03:28 PM, Jeff Moyer wrote:
>> Jens Axboe <axboe@fb.com> writes:
>>
>>> At Facebook, we have a number of cases where people use ionice to set a
>>> lower priority, then end up having tasks stuck for a long time because
>>> eg meta data updates from an idle priority tasks is blocking out higher
>>> priority processes. It's bad enough that it will trigger the softlockup
>>> warning.
>>>
>>> This patch adds code to CFQ that bumps the priority class and data for
>>> an idle task, if is doing IO marked as PRIO or META. With this, we no
>>> longer see the softlockups.
>>>
>>> Signed-off-by: Jens Axboe <axboe@fb.com>
>>>
>>> diff --git a/block/blk-core.c b/block/blk-core.c
>>> index 32a283eb7274..3cfd67d006fb 100644
>>> --- a/block/blk-core.c
>>> +++ b/block/blk-core.c
>>> @@ -1781,6 +1781,11 @@ get_rq:
>>> rw_flags |= REQ_SYNC;
>>>
>>> /*
>>> + * Add in META/PRIO flags, if set, before we get to the IO scheduler
>>> + */
>>> + rw_flags |= (bio->bi_rw & (REQ_META | REQ_PRIO));
>>> +
>>> + /*
>>
>> This needs a docbook update. It now reads:
>>
>> * @rw_flags: RW and SYNC flags
>>
>> so whatever flags we're adding should be specified, I guess.
>>
>> Speaking of which, after much waffling, I think I've decided it would be
>> cleaner to limit the priority boost to REQ_PRIO requests only.
>
> I went and checked, but I don't see it. Where is this?
Oops, sorry. I meant that get_request and __get_request need updates to
their documentation.
On the second part (in case there was confusion on what I meant there),
what I meant was only do the prio boost for REQ_PRIO requests instead
of also doing it for REQ_META. The way I arrived at that conclusion was
when I was going to ask you to update the documentation for REQ_META to
state that it implied REQ_PRIO, at which point, one has to wonder why we
need two flags.
There are cases where REQ_PRIO is used without REQ_META.
There are cases where REQ_META is used withoug REQ_PRIO.
And of course, there are cases where they're both sent down.
REQ_META itself is useful for tracing, and also makes the code
self-documenting.
REQ_PRIO pretty clearly means that we should boost priority for this
request. And I think Christoph was making a case for REQ_META that
doesn't require a priority boost (if I read what he said correctly).
So, I think they serve different purposes. Have I convinced you? It'll
make your patch smaller! ;-)
-Jeff
next prev parent reply other threads:[~2016-06-09 21:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 20:43 [PATCH] cfq: priority boost on meta/prio marked IO Jens Axboe
2016-06-09 15:55 ` Jeff Moyer
2016-06-09 16:00 ` Christoph Hellwig
2016-06-09 16:05 ` Jeff Moyer
2016-06-09 16:20 ` Jens Axboe
2016-06-09 18:31 ` Jeff Moyer
2016-06-09 20:14 ` Jens Axboe
2016-06-09 21:08 ` Jeff Moyer
2016-06-09 21:28 ` Jeff Moyer
2016-06-09 21:36 ` Jens Axboe
2016-06-09 21:41 ` Jens Axboe
2016-06-09 22:04 ` Jeff Moyer
2016-06-09 22:05 ` Jens Axboe
2016-06-09 22:08 ` Jeff Moyer
2016-06-09 22:15 ` Jens Axboe
2016-06-09 21:47 ` Jeff Moyer [this message]
2016-06-09 21:51 ` Jens Axboe
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=x49twh2vxtf.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=axboe@fb.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.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).