lkml.org 
[lkml]   [2007]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix race with shared tag queue maps
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-14 09:51    [W:0.035 / U:2.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site