Re: [PATCH mmotm] mm: introduce page_lru_base_type fix

KOSAKI Motohiro
2009-08-26T10:17:33Z

I'm sorry vmscan related patch bother you.
this is definitely right fix, thak you.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

> ---
>
> include/linux/mm_inline.h | 34 +++++++++++++++++-----------------
> 1 file changed, 17 insertions(+), 17 deletions(-)
>
> --- mmotm/include/linux/mm_inline.h 2009-08-21 12:12:42.000000000 +0100
> +++ linux/include/linux/mm_inline.h 2009-08-26 00:39:38.000000000 +0100
> @@ -35,42 +35,42 @@ del_page_from_lru_list(struct zone *zone
> mem_cgroup_del_lru_list(page, l);
> }
>
> +/**
> + * page_lru_base_type - which LRU list type should a page be on?
> + * @page: the page to test
> + *
> + * Used for LRU list index arithmetic.
> + *
> + * Returns the base LRU type - file or anon - @page should be on.
> + */
> +static inline enum lru_list page_lru_base_type(struct page *page)
> +{
> + if (page_is_file_cache(page))
> + return LRU_INACTIVE_FILE;
> + return LRU_INACTIVE_ANON;
> +}
> +
> static inline void
> del_page_from_lru(struct zone *zone, struct page *page)
> {
> - enum lru_list l = LRU_BASE;
> + enum lru_list l;
>
> list_del(&page->lru);
> if (PageUnevictable(page)) {
> __ClearPageUnevictable(page);
> l = LRU_UNEVICTABLE;
> } else {
> + l = page_lru_base_type(page);
> if (PageActive(page)) {
> __ClearPageActive(page);
> l += LRU_ACTIVE;
> }
> - l += page_is_file_cache(page);
> }
> __dec_zone_state(zone, NR_LRU_BASE + l);
> mem_cgroup_del_lru_list(page, l);
> }
>
> /**
> - * page_lru_base_type - which LRU list type should a page be on?
> - * @page: the page to test
> - *
> - * Used for LRU list index arithmetic.
> - *
> - * Returns the base LRU type - file or anon - @page should be on.
> - */
> -static enum lru_list page_lru_base_type(struct page *page)
> -{
> - if (page_is_file_cache(page))
> - return LRU_INACTIVE_FILE;
> - return LRU_INACTIVE_ANON;
> -}
> -
> -/**
> * page_lru - which LRU list should a page be on?
> * @page: the page to test
> *