public inbox for [email protected]
 help / color / mirror / Atom feed
* Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL?
@ 2021-03-25 11:33 Stefano Garzarella
  2021-03-25 13:44 ` Pavel Begunkov
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Garzarella @ 2021-03-25 11:33 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, linux-kernel

Hi Jens, Hi Pavel,
I was taking a look at the new SQPOLL handling with io_thread instead of 
kthread. Great job! Really nice feature that maybe can be reused also in 
other scenarios (e.g. vhost).

Regarding SQPOLL, IIUC these new threads are much closer to user 
threads, so is there still a need to require CAP_SYS_ADMIN and 
CAP_SYS_NICE to enable SQPOLL?

Thanks,
Stefano


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL?
  2021-03-25 11:33 Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL? Stefano Garzarella
@ 2021-03-25 13:44 ` Pavel Begunkov
  2021-03-25 14:02   ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Begunkov @ 2021-03-25 13:44 UTC (permalink / raw)
  To: Stefano Garzarella, Jens Axboe; +Cc: io-uring, linux-kernel

On 25/03/2021 11:33, Stefano Garzarella wrote:
> Hi Jens, Hi Pavel,
> I was taking a look at the new SQPOLL handling with io_thread instead of kthread. Great job! Really nice feature that maybe can be reused also in other scenarios (e.g. vhost).
> 
> Regarding SQPOLL, IIUC these new threads are much closer to user threads, so is there still a need to require CAP_SYS_ADMIN and CAP_SYS_NICE to enable SQPOLL?

Hmm, good question. If there are under same cgroup (should be in
theory), and if we add more scheduling points (i.e. need_resched()), and
don't see a reason why not. Jens?

Better not right away though. IMHO it's safer to let the change settle
down for some time.

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL?
  2021-03-25 13:44 ` Pavel Begunkov
@ 2021-03-25 14:02   ` Jens Axboe
  2021-03-25 14:09     ` Stefano Garzarella
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2021-03-25 14:02 UTC (permalink / raw)
  To: Pavel Begunkov, Stefano Garzarella; +Cc: io-uring, linux-kernel

On 3/25/21 7:44 AM, Pavel Begunkov wrote:
> On 25/03/2021 11:33, Stefano Garzarella wrote:
>> Hi Jens, Hi Pavel,
>> I was taking a look at the new SQPOLL handling with io_thread instead of kthread. Great job! Really nice feature that maybe can be reused also in other scenarios (e.g. vhost).
>>
>> Regarding SQPOLL, IIUC these new threads are much closer to user threads, so is there still a need to require CAP_SYS_ADMIN and CAP_SYS_NICE to enable SQPOLL?
> 
> Hmm, good question. If there are under same cgroup (should be in
> theory), and if we add more scheduling points (i.e. need_resched()), and
> don't see a reason why not. Jens?
> 
> Better not right away though. IMHO it's safer to let the change settle
> down for some time.

Yes, agree on both counts - we are not going to need elevated privileges
going forward, but I'd also rather defer making that change until 5.13
so we have a bit more time on the current (new) base first.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL?
  2021-03-25 14:02   ` Jens Axboe
@ 2021-03-25 14:09     ` Stefano Garzarella
  0 siblings, 0 replies; 4+ messages in thread
From: Stefano Garzarella @ 2021-03-25 14:09 UTC (permalink / raw)
  To: Jens Axboe, Pavel Begunkov; +Cc: io-uring, linux-kernel

On Thu, Mar 25, 2021 at 08:02:45AM -0600, Jens Axboe wrote:
>On 3/25/21 7:44 AM, Pavel Begunkov wrote:
>> On 25/03/2021 11:33, Stefano Garzarella wrote:
>>> Hi Jens, Hi Pavel,
>>> I was taking a look at the new SQPOLL handling with io_thread instead of kthread. Great job! Really nice feature that maybe can be reused also in other scenarios (e.g. vhost).
>>>
>>> Regarding SQPOLL, IIUC these new threads are much closer to user threads, so is there still a need to require CAP_SYS_ADMIN and CAP_SYS_NICE to enable SQPOLL?
>>
>> Hmm, good question. If there are under same cgroup (should be in
>> theory), and if we add more scheduling points (i.e. need_resched()), and
>> don't see a reason why not. Jens?
>>
>> Better not right away though. IMHO it's safer to let the change settle
>> down for some time.
>
>Yes, agree on both counts - we are not going to need elevated privileges
>going forward, but I'd also rather defer making that change until 5.13
>so we have a bit more time on the current (new) base first.

Yeah, that makes sense to me!

Thank you both for the quick clarification,
Stefano


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-25 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-25 11:33 Are CAP_SYS_ADMIN and CAP_SYS_NICE still needed for SQPOLL? Stefano Garzarella
2021-03-25 13:44 ` Pavel Begunkov
2021-03-25 14:02   ` Jens Axboe
2021-03-25 14:09     ` Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox