lkml.org 
[lkml]   [2009]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] prevent to reclaim anon page of lumpy reclaim for no swap space
Minchan Kim wrote:
> This patch prevent to reclaim anon page in case of no swap space.
> VM already prevent to reclaim anon page in various place.
> But it doesnt't prevent it for lumpy reclaim.
>
> It shuffles lru list unnecessary so that it is pointless.
> Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> ---
> mm/vmscan.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index 026f452..fb401fe 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -830,7 +830,13 @@ int __isolate_lru_page(struct page *page, int mode, int file)
> * When this function is being called for lumpy reclaim, we
> * initially look into all LRU pages, active, inactive and
> * unevictable; only give shrink_page_list evictable pages.
> +
> + * If we don't have enough swap space, reclaiming of anon page
> + * is pointless.
> */
> + if (nr_swap_pages <= 0 && PageAnon(page))
> + return ret;
> +

Should that be something like this:

if (nr_swap_pages <= 0 && (PageAnon(page) && !PageSwapCache(page)))

We can still reclaim anonymous pages that already have
a swap slot assigned to them.

--
All rights reversed.


\
 
 \ /
  Last update: 2009-06-25 16:13    [W:0.091 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site