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

From: Peter Zijlstra
Date: Wed Sep 14 2011 - 10:12:40 EST


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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/