lkml.org 
[lkml]   [2002]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: remove mixture of non-atomic operations with page->flags which requires atomic operations to access
On Sun, 2 Jun 2002, William Lee Irwin III wrote:
> page->flags is effectively a lock word as its various bits are updatable
> and accessible only by atomic operations. This patch removes the update
> of page->flags in __free_pages_ok() with non-atomic operations in favor
> of using atomic bit operations to update the bits to be cleared.
>
> ClearPageDirty(page);
> - page->flags &= ~(1<<PG_referenced);
> + ClearPageUptodate(page);
> + ClearPageSlab(page);
> + ClearPageNosave(page);
> + ClearPageChecked(page);

Don't all those atomic volatile bitops slow down a hotpath for no real
gain? I'm all for clearing all possible flag bits at that point, but
would prefer just one mask myself. But given all the preceding tests,
and the ClearPageDirty, perhaps I'm foolish to question your additions.

And wasn't it originally clearing the referenced bit, now leaving it?

Hugh

-
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-03-22 13:22    [W:0.065 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site