Re: [PATCH] kernel/sys: do not use tasklist_lock to set/get scheduling priorities

2020-05-03 Thread Davidlohr Bueso
Cc'ing Oleg who iirc also like this stuff. On Sat, 02 May 2020, Peter Zijlstra wrote: On Fri, May 01, 2020 at 08:05:39PM -0700, Davidlohr Bueso wrote: For both setpriority(2) and getpriority(2) there's really no need to be taking the tasklist_lock at all - for which both share it for the

Re: [PATCH] kernel/sys: do not use tasklist_lock to set/get scheduling priorities

2020-05-02 Thread Peter Zijlstra
On Fri, May 01, 2020 at 08:05:39PM -0700, Davidlohr Bueso wrote: > For both setpriority(2) and getpriority(2) there's really no need > to be taking the tasklist_lock at all - for which both share it > for the entirety of the syscall. The tasklist_lock does not protect > reading/writing the

[PATCH] kernel/sys: do not use tasklist_lock to set/get scheduling priorities

2020-05-01 Thread Davidlohr Bueso
For both setpriority(2) and getpriority(2) there's really no need to be taking the tasklist_lock at all - for which both share it for the entirety of the syscall. The tasklist_lock does not protect reading/writing the p->static_prio and task lookups are already rcu safe, providing a stable