[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [Xen-devel] Re: [PATCH] Fix cpu offline bug
>>> On 08.03.11 at 10:47, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote: > Jan, I'm not quite clear your meaning. > Why and where need to insert barrier, or volatile cpu_state? while ( (seen_state = cpu_state) != CPU_STATE_DEAD ) { + barrier(); BUG_ON(seen_state != CPU_STATE_DYING); mdelay(100); cpu_relax(); Without this, the compiler is free to eliminate "seen_state" in favor of reading "cpu_state" twice (irrespective of the optimizer very likely trying to do exactly the opposite). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |