From: Minchan Kim <minchan.kim@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Rik van Riel <riel@redhat.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
linux-mm <linux-mm@kvack.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH v2][mmotm-2009-0625-1549] prevent to reclaim anon page of lumpy reclaim for no swap space
Date: Sat, 27 Jun 2009 13:11:52 +0900 [thread overview]
Message-ID: <20090627131152.519b86ed.minchan.kim@gmail.com> (raw)
Since v1.
* fix - prevent anon page which already don't have swap slot
(by Rik van Riel suggestion)
* change some comment
== CUT HERE ==
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.
__isolate_lru_page is called on slow path so that some condition
check could be not critical about performance.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--- mm/vmscan.c.orig 2009-06-27 12:30:41.000000000 +0900
+++ mm/vmscan.c 2009-06-27 12:32:00.000000000 +0900
@@ -830,7 +830,13 @@ int __isolate_lru_page(struct page *page
* 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
+ * which don't already have a swap slot is pointless.
*/
+ if (nr_swap_pages <= 0 && (PageAnon(page) && !PageSwapCache(page)))
+ return ret;
+
if (PageUnevictable(page))
return ret;
--
Kinds Regards,
Minchan Kim
--
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>
reply other threads:[~2009-06-27 4:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20090627131152.519b86ed.minchan.kim@gmail.com \
--to=minchan.kim@gmail.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=mel@csn.ul.ie \
--cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox