Re: [PATCH 1/7] unevictable lru: Remember page's active state

KOSAKI Motohiro
2008-07-30T20:31:54Z

> @@ -483,12 +483,12 @@ int remove_mapping(struct address_space
> void putback_lru_page(struct page *page)
> {
> int lru;
> + int active = !!TestClearPageActive(page);
> int was_unevictable = PageUnevictable(page);
>
> VM_BUG_ON(PageLRU(page));
>
> redo:
> - lru = !!TestClearPageActive(page);
> ClearPageUnevictable(page);
>
> if (page_evictable(page, NULL)) {
> @@ -498,7 +498,7 @@ redo:
> * unevictable page on [in]active list.
> * We know how to handle that.
> */
> - lru += page_is_file_cache(page);
> + lru = active + page_is_file_cache(page);
> lru_cache_add_lru(page, lru);
> } else {

Indeed.

Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>