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

David Howells
2009-04-24T17:55:30Z

Oleg Nesterov <oleg@redhat.com> 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@woody.linux-foundation.org>
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