From: Rik van Riel <riel@redhat.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm <linux-mm@kvack.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] prevent to reclaim anon page of lumpy reclaim for no swap space
Date: Thu, 25 Jun 2009 10:09:38 -0400 [thread overview]
Message-ID: <4A438522.7040309@redhat.com> (raw)
In-Reply-To: <20090625183616.23b55b24.minchan.kim@barrios-desktop>
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.
WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: Minchan Kim <minchan.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm <linux-mm@kvack.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] prevent to reclaim anon page of lumpy reclaim for no swap space
Date: Thu, 25 Jun 2009 10:09:38 -0400 [thread overview]
Message-ID: <4A438522.7040309@redhat.com> (raw)
In-Reply-To: <20090625183616.23b55b24.minchan.kim@barrios-desktop>
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.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-06-25 14:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 9:36 [PATCH] prevent to reclaim anon page of lumpy reclaim for no swap space Minchan Kim
2009-06-25 9:36 ` Minchan Kim
2009-06-25 14:09 ` Rik van Riel [this message]
2009-06-25 14:09 ` Rik van Riel
2009-06-25 14:30 ` Minchan Kim
2009-06-25 14:30 ` Minchan Kim
2009-06-25 14:14 ` KOSAKI Motohiro
2009-06-25 14:14 ` KOSAKI Motohiro
2009-06-25 14:44 ` Minchan Kim
2009-06-25 14:44 ` Minchan Kim
2009-06-25 14:54 ` Lee Schermerhorn
2009-06-25 14:54 ` Lee Schermerhorn
2009-06-25 15:03 ` Minchan Kim
2009-06-25 15:03 ` Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A438522.7040309@redhat.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.