From: Matthew Wilcox <matthew@wil.cx>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: possible scsi driver bugs with atomic_set/atomic_read and missing barrier
Date: Tue, 10 Mar 2009 21:39:27 -0600 [thread overview]
Message-ID: <20090311033927.GB25995@parisc-linux.org> (raw)
In-Reply-To: <49B72F38.8090703@cs.wisc.edu>
On Tue, Mar 10, 2009 at 10:25:44PM -0500, Mike Christie wrote:
> atomic_set(&hba->state, SOME_STATE_VALUE);
>
> in a interrupt or thread or tasklet then in another thread they will do
>
> if (atomic_read(&hba->state) == SOME_STATE_VALUE))
>
> Does this mean that the drivers should be doing a
>
> atomic_set(&hba->state, SOME_STATE_VALUE);
> smp_mb();
Possibly "smp_mb__after_atomic_inc()" might be correct.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2009-03-11 3:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 3:25 possible scsi driver bugs with atomic_set/atomic_read and missing barrier Mike Christie
2009-03-11 3:39 ` Matthew Wilcox [this message]
2009-03-11 9:36 ` Stefan Richter
2009-03-11 8:45 ` Stefan Richter
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=20090311033927.GB25995@parisc-linux.org \
--to=matthew@wil.cx \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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