[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1316009543.5040.7.camel@twins>
Date: Wed, 14 Sep 2011 16:12:23 +0200
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
Darren Hart <dvhart@...ux.intel.com>,
Manfred Spraul <manfred@...orfullife.com>,
David Miller <davem@...emloft.net>,
Mike Galbraith <efault@....de>
Subject: Re: [RFC][PATCH 1/3] sched: Provide delayed wakeup list
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists