[lkml]   [2006]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux 2.4.34-pre3
Hi Nick,

On Wed, Sep 20, 2006 at 03:42:06AM +1000, Nick Piggin wrote:

[cut -pre3 advertisement]

> I wonder if 2.4 doesn't need the memory ordering fix to prevent pagecache
> corruption in reclaim? (
> What would need to be done is to test page_count before testing PageDirty,
> and putting an smp_rmb between the two.

I've read the thread, and Linus proposed to add an smp_wmb() in
set_page_dirty() too. I see that an smp_rmb() is already present
in shrink_cache() with the adequate comment. set_page_dirty() begins
with a test_and_set_bit() check. I suspect that transposing the fix
for 2.6 to 2.4 would imply to and an smp_wmb() here :

void fastcall set_page_dirty(struct page *page)
if (!test_and_set_bit(PG_dirty, &page->flags)) {
struct address_space *mapping = page->mapping;

+ smp_wmb();
if (mapping) {
mapping = page->mapping;

But I'm really reluctant on this change, as my knowledge here is rather
limited. Also, the fact that the first proposed part of the patch is here
makes me think that it has already been considered OK.

Maybe I'm wrong, I've CC'd Marcelo for any comments.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-09-19 20:37    [W:0.061 / U:6.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site