Re: [PATCH] locking/rwsem: simplify the is-owner-spinnable checks

2018-05-18 Thread Waiman Long
On 05/18/2018 12:55 PM, Oleg Nesterov wrote: > Add the trivial owner_on_cpu() helper for rwsem_can_spin_on_owner() and > rwsem_spin_on_owner(), it also allows to make rwsem_can_spin_on_owner() > a bit more clear. > > Signed-off-by: Oleg Nesterov > --- > kernel/locking/rwsem-xadd.c | 25 ++

[PATCH] locking/rwsem: simplify the is-owner-spinnable checks

2018-05-18 Thread Oleg Nesterov
Add the trivial owner_on_cpu() helper for rwsem_can_spin_on_owner() and rwsem_spin_on_owner(), it also allows to make rwsem_can_spin_on_owner() a bit more clear. Signed-off-by: Oleg Nesterov --- kernel/locking/rwsem-xadd.c | 25 + 1 file changed, 13 insertions(+), 12 dele