Re: [PATCH] __isolate_lru_page: skip unneeded mode check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/3/31 Bob Liu <lliubbo@xxxxxxxxx>:
> From: Bob Liu <lliubbo@xxxxxxxxx>
>
> Whether mode is ISOLATE_BOTH or not, we should compare
> page_is_file_cache with argument file.
>
> And there is no more need not when checking the active state.
>
> Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx>
> ---
>  mm/vmscan.c |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index e0e5f15..34d7e3d 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -862,15 +862,10 @@ int __isolate_lru_page(struct page *page, int mode, int file)
>        if (!PageLRU(page))
>                return ret;
>
> -       /*
> -        * When checking the active state, we need to be sure we are
> -        * dealing with comparible boolean values.  Take the logical not
> -        * of each.
> -        */
> -       if (mode != ISOLATE_BOTH && (!PageActive(page) != !mode))
> +       if (mode != ISOLATE_BOTH && (PageActive(page) != mode))
>                return ret;

no. please read the comment.

> -       if (mode != ISOLATE_BOTH && page_is_file_cache(page) != file)
> +       if (page_is_file_cache(page) != file)
>                return ret;

no. please consider lumpy reclaim.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]