From: Jan Kara <jack@suse.cz>
To: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Jan Kara <jack@suse.cz>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Niklas Cassel <Niklas.Cassel@wdc.com>,
Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH 8/8] block: Always initialize bio IO priority on submit
Date: Fri, 17 Jun 2022 16:54:23 +0200 [thread overview]
Message-ID: <20220617145423.wiff6pn4kufgtwr2@quack3> (raw)
In-Reply-To: <ef6c0c90-2f9e-12ed-5ad1-8d1500f5f502@opensource.wdc.com>
On Fri 17-06-22 21:03:45, Damien Le Moal wrote:
> On 6/17/22 20:49, Jan Kara wrote:
> > On Fri 17-06-22 09:04:34, Damien Le Moal wrote:
> >> 2) If IOPRIO_WHO_USER is not set, ioprio_get(IOPRIO_WHO_USER) will also
> >> return the effective priority.
> >
> > This is the same as above. Just the calls iterate over all tasks of the
> > given user...
> >
> >> 3) if IOPRIO_WHO_PROCESS is not set, return ? I am lost for this one. Do
> >> you want to go back to IOPRIO_CLASS_NONE ? Keep default (IOPRIO_CLASS_BE)
> >> ? Or switch to using the effective IO priority ? Not that the last 2
> >> choices are actually equivalent if the user did not IO nice the process
> >> (the default for the effective IO prio is class BE)
> >
> > I want to go back to returning IOPRIO_CLASS_NONE for tasks with unset IO
> > priority.
>
> And that would be to retain the older (broken) behavior. Because if we
> consider the man page, tasks with an unset IO prio should be reported as
> having the effective IO nice based priority, which is class BE if IO nice
> is not set. Right ? I am OK with that, but I think we should add this
> explanation as a comment somewhere in the prio code. No ?
Adding a comment regarding this is certainly a good idea, I'll do that. WRT
whether the old behavior is broken or not - I actually think the old
behavior is more useful because it allows userspace to distinguish a
situation when IO priority is set based on nice value from a situation when
IO priority is set to a fixed value. Also the old behavior makes
ioprio_set(pid, IOPRIO_WHO_PROCESS, ioprio_get(pid, IOPRIO_WHO_PROCESS))
a noop which is IMO a good property to have for a get/set APIs.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2022-06-17 14:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 16:16 [PATCH 0/8 v2] block: Fix IO priority mess Jan Kara
2022-06-15 16:16 ` [PATCH 1/8] block: Fix handling of tasks without ioprio in ioprio_get(2) Jan Kara
2022-06-15 16:16 ` [PATCH 2/8] block: Make ioprio_best() static Jan Kara
2022-06-15 16:16 ` [PATCH 3/8] block: fix default IO priority handling again Jan Kara
2022-06-15 16:16 ` [PATCH 4/8] block: Return effective IO priority from get_current_ioprio() Jan Kara
2022-06-15 16:16 ` [PATCH 5/8] blk-ioprio: Remove unneeded field Jan Kara
2022-06-15 16:16 ` [PATCH 6/8] blk-ioprio: Convert from rqos policy to direct call Jan Kara
2022-06-16 3:14 ` Damien Le Moal
2022-06-15 16:16 ` [PATCH 7/8] block: Initialize bio priority earlier Jan Kara
2022-06-15 16:16 ` [PATCH 8/8] block: Always initialize bio IO priority on submit Jan Kara
2022-06-16 3:15 ` Damien Le Moal
2022-06-16 11:23 ` Jan Kara
2022-06-16 12:24 ` Jan Kara
2022-06-17 0:04 ` Damien Le Moal
2022-06-17 11:49 ` Jan Kara
2022-06-17 12:03 ` Damien Le Moal
2022-06-17 14:54 ` Jan Kara [this message]
2022-06-17 0:05 ` Damien Le Moal
2022-06-17 11:52 ` Jan Kara
2022-06-17 12:00 ` Damien Le Moal
-- strict thread matches above, loose matches on Subject: below --
2022-06-20 16:11 [PATCH 0/8 v3] block: Fix IO priority mess Jan Kara
2022-06-20 16:11 ` [PATCH 8/8] block: Always initialize bio IO priority on submit Jan Kara
2022-06-21 0:02 ` Damien Le Moal
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=20220617145423.wiff6pn4kufgtwr2@quack3 \
--to=jack@suse.cz \
--cc=Niklas.Cassel@wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@opensource.wdc.com \
--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