From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>,
Yunlong Xing <yunlong.xing@unisoc.com>,
yunlongxing23@gmail.com, niuzhiguo84@gmail.com,
Hao_hao.Wang@unisoc.com
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] loop: inherit the ioprio in loop woker thread
Date: Wed, 22 May 2024 12:13:53 -0600 [thread overview]
Message-ID: <d9795483-ef64-4fd6-be71-a3946ae8fb3e@kernel.dk> (raw)
In-Reply-To: <f6d3e1f2-e004-49bb-b6c1-969915ccab37@acm.org>
On 5/22/24 12:12 PM, Bart Van Assche wrote:
> On 5/22/24 10:57, Jens Axboe wrote:
>> On 5/22/24 11:38 AM, Bart Van Assche wrote:
>>> On 5/22/24 00:48, Yunlong Xing wrote:
>>>> @@ -1913,6 +1921,10 @@ static void loop_handle_cmd(struct loop_cmd *cmd)
>>>> set_active_memcg(old_memcg);
>>>> css_put(cmd_memcg_css);
>>>> }
>>>> +
>>>> + if (ori_ioprio != cmd_ioprio)
>>>> + set_task_ioprio(current, ori_ioprio);
>>>> +
>>>> failed:
>>>> /* complete non-aio request */
>>>> if (!use_aio || ret) {
>>>
>>> Does adding this call in the hot path have a measurable performance impact?
>>
>> It's loop, I would not be concerned with overhead. But it does look pretty
>> bogus to modify the task ioprio from here.
>
> Hi Jens,
>
> Maybe Yunlong uses that call to pass the I/O priority to the I/O submitter?
>
> I think that it is easy to pass the I/O priority to the kiocb submitted by
> lo_rw_aio() without calling set_task_ioprio().
Yeah that was my point, it's both the completely wrong way to do it, nor
is it a sane way to do it. If the current stack off that doesn't allow
priority to be passed, then that work would need to be done first.
--
Jens Axboe
next prev parent reply other threads:[~2024-05-22 18:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 7:48 [PATCH] loop: inherit the ioprio in loop woker thread Yunlong Xing
2024-05-22 17:38 ` Bart Van Assche
2024-05-22 17:57 ` Jens Axboe
2024-05-22 18:12 ` Bart Van Assche
2024-05-22 18:13 ` Jens Axboe [this message]
2024-05-23 2:15 ` yunlong xing
2024-05-23 6:04 ` yunlong xing
2024-05-23 13:04 ` Jens Axboe
2024-05-23 14:52 ` yunlong xing
2024-05-23 14:58 ` Jens Axboe
2024-05-24 5:26 ` yunlong xing
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=d9795483-ef64-4fd6-be71-a3946ae8fb3e@kernel.dk \
--to=axboe@kernel.dk \
--cc=Hao_hao.Wang@unisoc.com \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=niuzhiguo84@gmail.com \
--cc=yunlong.xing@unisoc.com \
--cc=yunlongxing23@gmail.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