Re: [PATCH RFC 02/26] task_work: Replace spin_unlock_wait() with lock/unlock pair
From: Oleg Nesterov
Date: Fri Jun 30 2017 - 07:05:16 EST
On 06/29, Paul E. McKenney wrote:
>
> --- a/kernel/task_work.c
> +++ b/kernel/task_work.c
> @@ -109,7 +109,8 @@ void task_work_run(void)
> * the first entry == work, cmpxchg(task_works) should
> * fail, but it can play with *work and other entries.
> */
> - raw_spin_unlock_wait(&task->pi_lock);
> + raw_spin_lock(&task->pi_lock);
> + raw_spin_unlock(&task->pi_lock);
Well, bit the you need spin_lock_irq(). And this is one of the reasons
why I personally think unlock_wait have some sense...
Oleg.