Re: [PATCH RFC 5.13] io_uring: add IORING_REGISTER_PRIORITY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux