[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f11576a0908051936j6be1c7afta9d2004787b2760b@mail.gmail.com>
Date: Thu, 6 Aug 2009 11:36:56 +0900
From: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mel Gorman <mel@....ul.ie>, LKML <linux-kernel@...r.kernel.org>,
linux-mm@...ck.org
Subject: Re: [PATCH] page-allocator: Remove dead function free_cold_page()
2009/8/6 Andrew Morton <akpm@...ux-foundation.org>:
> On Wed, 5 Aug 2009 11:28:17 +0100 Mel Gorman <mel@....ul.ie> wrote:
>
>> The function free_cold_page() has no callers so delete it.
>>
>> Signed-off-by: Mel Gorman <mel@....ul.ie>
>> ---
>> include/linux/gfp.h | 1 -
>> mm/page_alloc.c | 5 -----
>> 2 files changed, 6 deletions(-)
>>
>> diff --git a/include/linux/gfp.h b/include/linux/gfp.h
>> index 7c777a0..c32bfa8 100644
>> --- a/include/linux/gfp.h
>> +++ b/include/linux/gfp.h
>> @@ -326,7 +326,6 @@ void free_pages_exact(void *virt, size_t size);
>> extern void __free_pages(struct page *page, unsigned int order);
>> extern void free_pages(unsigned long addr, unsigned int order);
>> extern void free_hot_page(struct page *page);
>> -extern void free_cold_page(struct page *page);
>>
>> #define __free_page(page) __free_pages((page), 0)
>> #define free_page(addr) free_pages((addr),0)
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index d052abb..36758db 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -1065,11 +1065,6 @@ void free_hot_page(struct page *page)
>> free_hot_cold_page(page, 0);
>> }
>>
>> -void free_cold_page(struct page *page)
>> -{
>> - free_hot_cold_page(page, 1);
>> -}
>> -
>> /*
>> * split_page takes a non-compound higher-order page, and splits it into
>> * n (1<<order) sub-pages: page[0..n]
>
> Well I spose so. But the function is valid and might need to be
> resurrected at any stage. We could `#if 0' it to save a few bytes of
> text, perhaps.
>
> I wonder how many free_page() callers should really be calling
> free_cold_page(). c'mon, write a thingy to work it out ;) You can
> query a page's hotness by timing how long it takes to read all its
> cachelines.
if we decide to keep this function, I think we also need to consider
make it exporting.
Driver developers never user unexported function.
Or, Can we free_hot_page() and free_cold_page move to inlined function?
--
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