All of lore.kernel.org
 help / color / mirror / Atom feed
From: yebin <yebin@huaweicloud.com>
To: Bart Van Assche <bvanassche@acm.org>,
	axboe@kernel.dk, linux-block@vger.kernel.org
Cc: ming.lei@redhat.com
Subject: Re: [PATCH 1/2] block/mq-deadline: disable I/O priority when prio_aging_expire is zero
Date: Fri, 21 Aug 2026 10:06:17 +0800	[thread overview]
Message-ID: <6A87B299.2040207@huaweicloud.com> (raw)
In-Reply-To: <7b469479-e9c5-444e-919f-c18c17893bb7@acm.org>



On 2026/8/20 23:31, Bart Van Assche wrote:
> On 8/19/26 7:12 PM, Ye Bin wrote:
>> Since the mq-deadline scheduler introduced support for I/O priorities,
>> if a process does not have an I/O priority configured, it becomes bound
>> to the process's scheduling priority.
>
> How can this happen? The scheduling priority (sched_setparam()) and I/O
> priority (ioprio_set()) are independent as far as I know.
>
Yes, I thought so at first. However, after checking the historical records,
I found that the IO priority was set based on the task scheduling class when
the IO priority was not configured. This was introduced by the f7eda402878b
("block: Return effective IO priority from get_current_ioprio()") and
a78418e6a04c ("block: Always initialize bio IO priority on submit") commits.
>> Setting prio_aging_expire to zero does not actually turn off I/O
>> priority in mq-deadline.
>
> prio_aging_expire should not be set to zero. Feel free to submit a patch
> that disallows setting prio_aging_expire to zero.
>
Yes, setting it to 0 can cause priority inversion issues. However, I understand
that even when a relatively small value is set, priority inversion can still
occur. This is because the system first checks whether the lower-priority IO
has timed out, and if it has, it then dispatches the lower-priority IO. In
cases of high IO pressure, this can actually result in the lower-priority IO
being dispatched first. So, is it sufficient to constrain this value to zero?
Or is this value entirely up to the user to control? From the user's perspective,
a naive view would be that setting this value close to zero means not distinguishing
priorities. Indeed, our product was designed with this idea in mind, setting the
value to 0 to disable priority, but it ended up causing IO priority inversion issues.
> Thanks,
>
> Bart.
>


  reply	other threads:[~2026-08-21  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20  2:12 [PATCH 0/2] disable I/O priority when prio_aging_expire is zero Ye Bin
2026-08-20  2:12 ` [PATCH 1/2] block/mq-deadline: " Ye Bin
2026-08-20 15:31   ` Bart Van Assche
2026-08-21  2:06     ` yebin [this message]
2026-08-20  2:12 ` [PATCH 2/2] block/mq-deadline: add module parameter for prio_aging_expire default Ye Bin
2026-08-20 15:54   ` Bart Van Assche

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=6A87B299.2040207@huaweicloud.com \
    --to=yebin@huaweicloud.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.