From: Yu Kuai <yukuai1@huaweicloud.com>
To: Guenter Roeck <linux@roeck-us.net>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Bart Van Assche <bvanassche@acm.org>,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] block: Fix default IO priority if there is no IO context
Date: Thu, 31 Jul 2025 15:05:15 +0800 [thread overview]
Message-ID: <a97c3d4d-4b69-ed64-154b-4329e94a703a@huaweicloud.com> (raw)
In-Reply-To: <20250731044953.1852690-1-linux@roeck-us.net>
在 2025/07/31 12:49, Guenter Roeck 写道:
> Upstream commit 53889bcaf536 ("block: make __get_task_ioprio() easier to
> read") changes the IO priority returned to the caller if no IO context
> is defined for the task. Prior to this commit, the returned IO priority
> was determined by task_nice_ioclass() and task_nice_ioprio(). Now it is
> always IOPRIO_DEFAULT, which translates to IOPRIO_CLASS_NONE with priority
> 0. However, task_nice_ioclass() returns IOPRIO_CLASS_IDLE, IOPRIO_CLASS_RT,
> or IOPRIO_CLASS_BE depending on the task scheduling policy, and
> task_nice_ioprio() returns a value determined by task_nice(). This causes
> regressions in test code checking the IO priority and class of IO
> operations on tasks with no IO context.
>
> Fix the problem by returning the IO priority calculated from
> task_nice_ioclass() and task_nice_ioprio() if no IO context is defined
> to match earlier behavior.
>
> Fixes: 53889bcaf536 ("block: make __get_task_ioprio() easier to read")
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Bart Van Assche <bvanassche@acm.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> include/linux/ioprio.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
LGTM
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Thanks
next prev parent reply other threads:[~2025-07-31 7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 4:49 [PATCH] block: Fix default IO priority if there is no IO context Guenter Roeck
2025-07-31 5:22 ` Damien Le Moal
2025-07-31 7:05 ` Yu Kuai [this message]
2025-07-31 21:02 ` 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=a97c3d4d-4b69-ed64-154b-4329e94a703a@huaweicloud.com \
--to=yukuai1@huaweicloud.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=yukuai3@huawei.com \
/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).