Re: [PATCH 2/2] kernel/sys: do not grab tasklist_lock for sys_setpriority(PRIO_PROCESS)

2020-05-12 Thread Oleg Nesterov
On 05/11, Davidlohr Bueso wrote: > > This option does not iterate the tasklist and we already have > an rcu aware stable pointer. Also, the nice value is not serialized > by this lock. Reduce the scope of this lock to just PRIO_PGRP > and PRIO_USER - which need to to set the priorities atomically >

[PATCH 2/2] kernel/sys: do not grab tasklist_lock for sys_setpriority(PRIO_PROCESS)

2020-05-11 Thread Davidlohr Bueso
This option does not iterate the tasklist and we already have an rcu aware stable pointer. Also, the nice value is not serialized by this lock. Reduce the scope of this lock to just PRIO_PGRP and PRIO_USER - which need to to set the priorities atomically to the list of tasks, at least vs fork(). S