From: Jens Axboe <jens.axboe@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
orgis@agnld.uni-potsdam.de, arekm@maven.pl, ed.lin@promise.com,
Andrew Morton <akpm@linux-foundation.org>,
James.Bottomley@SteelEye.com
Subject: Re: [PATCH] Fix race with shared tag queue maps
Date: Fri, 14 Sep 2007 09:47:31 +0200 [thread overview]
Message-ID: <20070914074731.GV25592@kernel.dk> (raw)
In-Reply-To: <alpine.LFD.0.999.0709130840450.16478@woody.linux-foundation.org>
On Thu, Sep 13 2007, Linus Torvalds wrote:
>
>
> On Thu, 13 Sep 2007, Jens Axboe wrote:
> >
> > My bad, I think I added the smp_mb__before_clear_bit() when it was
> > __test_and_set_bit() like in the first hunk.
>
> Ahh, that wouldn't work at all. The "__test_and_set_bit()" thing isn't
> atomic at all, and no amount of memory barriers around it would help
> (you'd need to use real locking, but at that point the memory barriers are
> pointless anyway).
Hence the change, it looks like an oversight from when we didn't allow
sharing of tag maps (then the queue lock provided adequate protection).
> > + /*
> > + * Ensure ordering between ->tag_index[tag] clear and tag clear
> > + */
> > + smp_mb__after_clear_bit();
>
> You still left this one. But never mind - I already edited your original
> patch and it's in my tree with both of those things removed.
I took at look at the committed patch and it looks fine, thanks Linus.
--
Jens Axboe
next prev parent reply other threads:[~2007-09-14 7:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 12:26 [PATCH] Fix race with shared tag queue maps Jens Axboe
2007-09-13 15:16 ` Linus Torvalds
2007-09-13 15:22 ` Jens Axboe
2007-09-13 15:42 ` Linus Torvalds
2007-09-14 7:47 ` Jens Axboe [this message]
2007-09-14 6:19 ` Arkadiusz Miskiewicz
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=20070914074731.GV25592@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=James.Bottomley@SteelEye.com \
--cc=akpm@linux-foundation.org \
--cc=arekm@maven.pl \
--cc=ed.lin@promise.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=orgis@agnld.uni-potsdam.de \
--cc=torvalds@linux-foundation.org \
/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