[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Nov 2008 14:49:01 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Vegard Nossum <vegard.nossum@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, "Rafael J. Wysocki" <rjw@...k.pl>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kernel Testers List <kernel-testers@...r.kernel.org>,
Rusty Russell <rusty@...tcorp.com.au>,
Oleg Nesterov <oleg@...hat.com>,
Dmitry Adamushko <dmitry.adamushko@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Bug #11989] Suspend failure on NForce4-based boards due to
chanes in stop_machine
On Tue, 2008-11-11 at 14:36 +0100, Vegard Nossum wrote:
> On Tue, Nov 11, 2008 at 11:52 AM, Ingo Molnar <mingo@...e.hu> wrote:
> > [ Cc:-ed workqueue/locking/suspend-race-condition experts. ]
>
> Heh. I am not expert, but I looked at the code. The obvious suspicious
> thing to see is the use of unpaired barriers? Maybe like this:
>
> 47 static void set_state(enum stopmachine_state newstate)
> 48 {
> 49 /* Reset ack counter. */
> 50 atomic_set(&thread_ack, num_threads);
> 51 smp_wmb();
>
> + /* force ordering between thread_ack/state */
>
> 52 state = newstate;
> 53 }
> 54
> 55 /* Last one to ack a state moves to the next state. */
> 56 static void ack_state(void)
> 57 {
> 58 if (atomic_dec_and_test(&thread_ack))
>
> Maybe
> + /* force ordering between thread_ack/state */
> + smp_rmb();
> here?
all atomic ops that have return values imply a full barrier, iirc
> 59 set_state(state + 1);
> 60 }
> 61
>
> Or maybe I am wrong. But Documentation/memory-barriers.txt is rather
> explicit on this point.
>
>
> Vegard
>
--
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