Re: remove mixture of non-atomic operations with page->flags which

David S. Miller (davem@redhat.com)
Mon, 03 Jun 2002 02:12:36 -0700 (PDT)


From: Hugh Dickins <hugh@veritas.com>
Date: Mon, 3 Jun 2002 11:14:43 +0100 (BST)

On Sun, 2 Jun 2002, William Lee Irwin III wrote:
>
> 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?

Furthermore, when this code runs there should be no way for any
part of the kernel to reference the page in a way that cares
about these flag bits.

So if anything, we should be doing _ALL_ of the flag bitsops
non-atomically.
-
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/