From: "Jan Beulich" <JBeulich@novell.com>
To: Jinsong Liu <jinsong.liu@intel.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Keir Fraser <keir.xen@gmail.com>, Xin Li <xin.li@intel.com>,
Yunhong Jiang <yunhong.jiang@intel.com>
Subject: RE: Re: [PATCH] Fix cpu offline bug
Date: Tue, 08 Mar 2011 10:14:08 +0000 [thread overview]
Message-ID: <4D760F8002000078000351E8@vpn.id2.novell.com> (raw)
In-Reply-To: <BC00F5384FCFC9499AF06F92E8B78A9E1FABB28525@shsmsx502.ccr.corp.intel.com>
>>> On 08.03.11 at 10:47, "Liu, Jinsong" <jinsong.liu@intel.com> 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
next prev parent reply other threads:[~2011-03-08 10:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 10:22 [PATCH] Fix cpu offline bug Liu, Jinsong
2011-03-04 10:49 ` Keir Fraser
2011-03-08 8:52 ` Jan Beulich
2011-03-08 9:47 ` Liu, Jinsong
2011-03-08 10:14 ` Jan Beulich [this message]
2011-03-08 15:36 ` Keir Fraser
2011-03-05 11:40 ` Keir Fraser
2011-03-05 15:10 ` Liu, Jinsong
2011-03-05 15:57 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D760F8002000078000351E8@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=jinsong.liu@intel.com \
--cc=keir.xen@gmail.com \
--cc=xen-devel@lists.xensource.com \
--cc=xin.li@intel.com \
--cc=yunhong.jiang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).