Re: [PATCH] It may not be assumed that wake_up(), finish_wait() and co. imply a memory barrier

From: David Howells
Date: Fri Apr 24 2009 - 13:55:31 EST


Oleg Nesterov <oleg@xxxxxxxxxx> wrote:

> Suppose that "event_indicated = 1" leaks into try_to_wake_up() after we
> read p->state.

In that case, it's entirely possible that the smp_wmb() in try_to_wake_up()
should actually be an smp_mb(), but that on whichever arch patch:

commit 04e2f1741d235ba599037734878d72e57cb302b5
Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Sat Feb 23 18:05:03 2008 -0800
Subject: Add memory barrier semantics to wake_up() & co

was tested on, it made no difference.

David
--
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/