Re: [2.6 patch] mm/page_alloc.c: cleanups
From: Andrew Morton
Date: Mon May 05 2008 - 17:14:54 EST
On Tue, 6 May 2008 05:59:31 +0900
"KOSAKI Motohiro" <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
> > > > -void free_cold_page(struct page *page)
> > > > -{
> > > > - free_hot_cold_page(page, 1);
> > > > -}
> > >
> > > Wow, I didn't know nobody use cold page :)
> >
> > that's a bug, surely? I bet there are plenty of places which should be
> > using this hint.
>
> Hm, as far as I investigate
>
> 1. nobody used free_cold_page() in kernel code tree.
> 2. free_cold_page() doesn't exported.
>
> I investigated to 2.6.25-mm1.
> I don't understand yet why you think plenty....
Any place in the kernel which frees a page which is probably cache-cold
should be using this function. (Including any place which caused the page
to be evicted from CPU cache by placing it under DMA).
But nobody thinks about providing the hint.
Probably it doesn't matter much at all, except in those few places which
free a lot of pages.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/