All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Hao Xu <haoxu@linux.alibaba.com>
Cc: io-uring@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>,
	Joseph Qi <joseph.qi@linux.alibaba.com>
Subject: Re: [PATCH RFC 5.13] io_uring: add IORING_REGISTER_PRIORITY
Date: Thu, 6 May 2021 11:10:21 -0600	[thread overview]
Message-ID: <38e587bb-a484-24dc-1ea9-cc252b1639ba@kernel.dk> (raw)
In-Reply-To: <1620311593-46083-1-git-send-email-haoxu@linux.alibaba.com>

On 5/6/21 8:33 AM, Hao Xu wrote:
> Users may want a higher priority for sq_thread or io-worker. Provide a
> way to change the nice value(for SCHED_NORMAL) or scheduling policy.

Silly question - why is this needed for sqpoll? With the threads now
being essentially user threads, why can't we just modify nice and
scheduler class from userspace instead? That should work now. I think
this is especially true for sqpoll where it's persistent, and argument
could be made for the io-wq worker threads that we'd need io_uring
support for that, as they come and go and there's no reliable way to
find and tweak the thread scheduler settings for that particular use
case.

It may be more convenient to support this through io_uring, and that is
a valid argument. I do think that the better way would then be to simply
pass back the sqpoll pid after ring setup, because then it'd almost be
as simple to do it from the app itself using the regular system call
interfaces for that.

In summary, I do think this _may_ make sense for the worker threads,
being able to pass in this information and have io-wq worker thread
setup perform the necessary tweaks when a thread is created, but it does
seem a bit silly to add this for sqpoll where it could just as easily be
achieved from the application itself without needing to add this
support.

What do you think?

-- 
Jens Axboe


  reply	other threads:[~2021-05-06 17:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 14:33 [PATCH RFC 5.13] io_uring: add IORING_REGISTER_PRIORITY Hao Xu
2021-05-06 17:10 ` Jens Axboe [this message]
2021-05-06 19:20   ` Hao Xu
2021-05-07 15:19     ` Pavel Begunkov
2021-05-07 15:23       ` Jens Axboe
2021-05-07 15:22     ` 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=38e587bb-a484-24dc-1ea9-cc252b1639ba@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=haoxu@linux.alibaba.com \
    --cc=io-uring@vger.kernel.org \
    --cc=joseph.qi@linux.alibaba.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.