[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0812012014150.30344@quilx.com>
Date: Mon, 1 Dec 2008 20:21:45 -0600 (CST)
From: Christoph Lameter <cl@...ux-foundation.org>
To: Hugh Dickins <hugh@...itas.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Russ Anderson <rja@....com>,
Nick Piggin <nickpiggin@...oo.com.au>,
Dave Jones <davej@...hat.com>,
Arjan van de Ven <arjan@...radead.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH 1/8] badpage: simplify page_alloc flag check+clear
On Mon, 1 Dec 2008, Hugh Dickins wrote:
> > Rename this to PAGE_FLAGS_CLEAR_WHEN_FREE?
>
> No, that's a list of just the ones it's checking at free;
> it then (with this patch) goes on to clear all of them.
But they are always clear on free. The checking is irrelevant.
> One of the problems with PREP is that it's not obvious that it
> means ALLOC: yes, I'd be happier with PAGE_FLAGS_CLEAR_AT_FREE.
Ok.
>
> > This is equal to
> >
> > page->flags &=~PAGE_FLAGS_CHECK_AT_PREP;
> >
> > You can drop the if...
>
> I was intentionally following the existing style of
> if (PageDirty(page))
> __ClearPageDirty(page);
> if (PageSwapBacked(page))
> __ClearPageSwapBacked(page);
> which is going out of its way to avoid dirtying a cacheline.
>
> In all the obvious cases, I think the cacheline will already
> be dirty; but I guess there's an important case (high order
> but not compound?) which has a lot of clean cachelines.
Free or alloc dirties the cacheline of the page struct regardless since
the LRU field is always modified.
Well, ok. The not compound high order case may be an exception.
But then lets at least make a single check
If (page->flags & (all the flags including dirty and SwapBacked))
zap-em.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists