From: Arjan van de Ven <arjan@infradead.org>
To: "Zhang, Yanmin" <yanmin.zhang@intel.com>
Cc: linux-kernel@vger.kernel.org, "Pallipadi,
Venkatesh" <venkatesh.pallipadi@intel.com>,
"Shah, Rajesh" <rajesh.shah@intel.com>
Subject: Re: [BUG] Variable stopmachine_state should be volatile
Date: Fri, 02 Dec 2005 09:04:26 +0100 [thread overview]
Message-ID: <1133510666.16520.3.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <8126E4F969BA254AB43EA03C59F44E84040B3069@pdsmsx404>
On Wed, 2005-11-30 at 10:04 +0800, Zhang, Yanmin wrote:
> The model to access variable stopmachine_state is that a main thread
> writes it and other threads read it. Its declaration has no sign
> volatile. In the while loop in function stopmachine, this variable is
> read, and compiler might optimize it by reading it once before the loop
> and not reading it again in the loop, so the thread might enter dead
> loop.
cpu_relax() includes a compiler barier..... so... what's wrong with the
compiler that it ignores such barriers?
next prev parent reply other threads:[~2005-12-02 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-30 2:04 Zhang, Yanmin
2005-11-30 22:19 ` Pavel Machek
2005-12-02 8:04 ` Arjan van de Ven [this message]
2005-12-01 2:58 Zhang, Yanmin
2005-12-01 3:25 ` Pavel Machek
2005-12-01 5:27 Zhang, Yanmin
2005-12-01 10:26 ` Pavel Machek
2005-12-02 2:48 Zhang, Yanmin
[not found] <88056F38E9E48644A0F562A38C64FB60067BE61C@scsmsx403.amr.corp.intel.com>
2005-12-02 3:53 ` Pavel Machek
2005-12-08 1:37 Zhang, Yanmin
2005-12-12 13:39 ` Christoph Hellwig
2005-12-08 18:53 Luck, Tony
2005-12-12 7:06 Zhang, Yanmin
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=1133510666.16520.3.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rajesh.shah@intel.com \
--cc=venkatesh.pallipadi@intel.com \
--cc=yanmin.zhang@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
all inboxes | Powered by JetHome®