Re: [RFC][PATCH 1/3] sched: Provide delayed wakeup list

Peter Zijlstra
2011-09-14T14:12:40Z

On Wed, 2011-09-14 at 16:08 +0200, Eric Dumazet wrote:
> I dont understand why you make a get_task_struct() before the cmpxchg()
> and rollback. We certainly must hold a lock/mutex before calling
> wake_list_add()
>
> It could be :
>
> {
> if (cmpxchg(&n->next, NULL, head->first))
> return;
>
> get_task_struct(p);
> head->first = n;
> }

You're quite right. No idea why I wrote it like that..