linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hillf Danton <dhillf@gmail.com>
To: Mel Gorman <mgorman@suse.de>
Cc: linux-mm@kvack.org,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	David Rientjes <rientjes@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: vmscan: fix setting reclaim mode
Date: Tue, 10 Jan 2012 23:58:03 +0800	[thread overview]
Message-ID: <CAJd=RBA7vj83SFQFMS5WaRCfz2ndGJXepBqi5tK0LPjnBYYgfg@mail.gmail.com> (raw)
In-Reply-To: <20120110094452.GC4118@suse.de>

On Tue, Jan 10, 2012 at 5:44 PM, Mel Gorman <mgorman@suse.de> wrote:
> On Sun, Jan 08, 2012 at 03:05:03PM +0800, Hillf Danton wrote:
>> 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.
>>
>
> No explanation of problem, how this patch fixes it or what the impact
> is.
>
> At a glance, this will have the impact of using sync reclaim at low
> reclaim priorities. This is unexpected so needs much better explanation.
>

Hi Mel

It is reprepared, please review again.

Thanks
Hillf

===cut please===
From: Hillf Danton <dhillf@gmail.com>
[PATCH] mm: vmscan: fix setting reclaim mode

The comment says, initially assume we are entering either lumpy reclaim or
reclaim/compaction, and depending on the reclaim order, we will either set the
sync mode or just reclaim order-0 pages later.

On other hand, order-0 reclaim, instead of sync reclaim, is expected when
under memory pressure, but the check for memory pressure is incorrect,
leading to sync reclaim at low reclaim priorities.

And the result is sync reclaim is set for high priorities.


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	Tue Jan 10 23:03:48 2012
@@ -387,7 +387,7 @@ static void set_reclaim_mode(int priorit
 	 */
 	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;

  reply	other threads:[~2012-01-10 15:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08  7:05 [PATCH] mm: vmscan: fix setting reclaim mode Hillf Danton
2012-01-10  9:44 ` Mel Gorman
2012-01-10 15:58   ` Hillf Danton [this message]
2012-01-10 16:44     ` Mel Gorman
2012-01-10 16:58       ` 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=RBA7vj83SFQFMS5WaRCfz2ndGJXepBqi5tK0LPjnBYYgfg@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: 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;
as well as URLs for NNTP newsgroup(s).