Re: [ANNOUNCE] Kernel Janitor's TODO list

Andrea Arcangeli (andrea@suse.de)
Fri, 16 Feb 2001 15:29:14 +0100


On Mon, Jan 29, 2001 at 09:35:53PM +0100, Andi Kleen wrote:
> On Mon, Jan 29, 2001 at 08:47:50PM +0100, Roman Zippel wrote:
> > You still miss wakeups. :)
>
> And there was another race in it, I know. The first __set_task_state
> has to be set_task_state to get the right memory write order on SMP.

If the wakeup is serialized by the spinlock too (as your code looks like to
assume) you can legally use __set_task_state instead of set_task_state. An
example of such an usage (where wakeup is serialized by the spinlock) is
lock_sock/unlock_sock.

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