lkml.org 
[lkml]   [2005]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible memory ordering bug in page reclaim?
Linus Torvalds wrote:

> I agree, however, that it looks like PG_dirty is racy. Probably not in
> practice, but still.
>
> So I'd suggest adding a smp_wmb() into set_page_dirty, and the rmb where
> Nick suggested.
>
> So I'd suggest a patch something more like this.. Marking the dirty/count
> cases unlikely too in mm/page-writeback.c, since we should have tested for
> these conditions optimistically outside the lock.
>

As Dave suggested, I think there is too much other code that depends on
these atomics to be barriers for us to change it (at least not in this
patch! :)).


> Comments? Nick, did you have some test-case that you think might actually
> have been impacted by this?
>

I guess your vmscan.c hunks are slightly nicer, though I might put
'cannot_free' right at the end, because it will be a very uncommon case.

And no, I don't have a test case. In fact, I wouldn't be surprised if
nobody anywhere has ever hit it :) I was just browsing code...

Thanks,
Nick

--
SUSE Labs, Novell Inc.

Send instant messages to your online friends http://au.messenger.yahoo.com

-
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: 2005-10-16 02:08    [W:0.067 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site