From: Hillf Danton <dhillf@gmail.com> To: linux-mm@kvack.org Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>, David Rientjes <rientjes@google.com>, Mel Gorman <mgorman@suse.de>, Andrew Morton <akpm@linux-foundation.org>, LKML <linux-kernel@vger.kernel.org>, Hillf Danton <dhillf@gmail.com> Subject: [PATCH] mm: vmscan: fix setting reclaim mode Date: Sun, 8 Jan 2012 15:05:03 +0800 [thread overview] Message-ID: <CAJd=RBAqzawZ=jEFt7TrZgU0gaejMkfiBxzH7Y19qqNnsZrJGw@mail.gmail.com> (raw) The check for under memory pressure is corrected, then lumpy reclaim or reclaim/compaction could be avoided either when for order-O reclaim or when free pages are already low enough. Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Hillf Danton <dhillf@gmail.com> --- --- a/mm/vmscan.c Thu Dec 29 20:20:16 2011 +++ b/mm/vmscan.c Sun Jan 8 13:22:12 2012 @@ -365,8 +365,7 @@ out: return ret; } -static void set_reclaim_mode(int priority, struct scan_control *sc, - bool sync) +static void set_reclaim_mode(int priority, struct scan_control *sc, bool sync) { reclaim_mode_t syncmode = sync ? RECLAIM_MODE_SYNC : RECLAIM_MODE_ASYNC; @@ -381,13 +380,12 @@ static void set_reclaim_mode(int priorit sc->reclaim_mode = RECLAIM_MODE_LUMPYRECLAIM; /* - * Avoid using lumpy reclaim or reclaim/compaction if possible by - * restricting when its set to either costly allocations or when - * under memory pressure + * Avoid lumpy reclaim or reclaim/compaction either + * when for order-O reclaim or when under memory pressure */ if (sc->order > PAGE_ALLOC_COSTLY_ORDER) sc->reclaim_mode |= syncmode; - else if (sc->order && priority < DEF_PRIORITY - 2) + else if (sc->order && priority >= DEF_PRIORITY - 2) sc->reclaim_mode |= syncmode; else sc->reclaim_mode = RECLAIM_MODE_SINGLE | RECLAIM_MODE_ASYNC;
WARNING: multiple messages have this Message-ID (diff)
From: Hillf Danton <dhillf@gmail.com> To: linux-mm@kvack.org Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>, David Rientjes <rientjes@google.com>, Mel Gorman <mgorman@suse.de>, Andrew Morton <akpm@linux-foundation.org>, LKML <linux-kernel@vger.kernel.org>, Hillf Danton <dhillf@gmail.com> Subject: [PATCH] mm: vmscan: fix setting reclaim mode Date: Sun, 8 Jan 2012 15:05:03 +0800 [thread overview] Message-ID: <CAJd=RBAqzawZ=jEFt7TrZgU0gaejMkfiBxzH7Y19qqNnsZrJGw@mail.gmail.com> (raw) The check for under memory pressure is corrected, then lumpy reclaim or reclaim/compaction could be avoided either when for order-O reclaim or when free pages are already low enough. Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Hillf Danton <dhillf@gmail.com> --- --- a/mm/vmscan.c Thu Dec 29 20:20:16 2011 +++ b/mm/vmscan.c Sun Jan 8 13:22:12 2012 @@ -365,8 +365,7 @@ out: return ret; } -static void set_reclaim_mode(int priority, struct scan_control *sc, - bool sync) +static void set_reclaim_mode(int priority, struct scan_control *sc, bool sync) { reclaim_mode_t syncmode = sync ? RECLAIM_MODE_SYNC : RECLAIM_MODE_ASYNC; @@ -381,13 +380,12 @@ static void set_reclaim_mode(int priorit sc->reclaim_mode = RECLAIM_MODE_LUMPYRECLAIM; /* - * Avoid using lumpy reclaim or reclaim/compaction if possible by - * restricting when its set to either costly allocations or when - * under memory pressure + * Avoid lumpy reclaim or reclaim/compaction either + * when for order-O reclaim or when under memory pressure */ if (sc->order > PAGE_ALLOC_COSTLY_ORDER) sc->reclaim_mode |= syncmode; - else if (sc->order && priority < DEF_PRIORITY - 2) + else if (sc->order && priority >= DEF_PRIORITY - 2) sc->reclaim_mode |= syncmode; else sc->reclaim_mode = RECLAIM_MODE_SINGLE | RECLAIM_MODE_ASYNC; -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2012-01-08 7:05 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-08 7:05 Hillf Danton [this message] 2012-01-08 7:05 ` [PATCH] mm: vmscan: fix setting reclaim mode Hillf Danton 2012-01-10 9:44 ` Mel Gorman 2012-01-10 9:44 ` Mel Gorman 2012-01-10 15:58 ` Hillf Danton 2012-01-10 15:58 ` Hillf Danton 2012-01-10 16:44 ` Mel Gorman 2012-01-10 16:44 ` Mel Gorman 2012-01-10 16:58 ` Hillf Danton 2012-01-10 16:58 ` Hillf Danton 2012-01-11 12:12 ` Hillf Danton 2012-01-11 12:12 ` Hillf Danton
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='CAJd=RBAqzawZ=jEFt7TrZgU0gaejMkfiBxzH7Y19qqNnsZrJGw@mail.gmail.com' \ --to=dhillf@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=kamezawa.hiroyu@jp.fujitsu.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=mgorman@suse.de \ --cc=rientjes@google.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: linkBe 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.