linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Rik van Riel <riel@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	akpm@linux-foundation.org
Subject: Re: [PATCH] vmscan: skip freeing memory from zones with lots free
Date: Fri, 28 Nov 2008 12:30:14 +0100	[thread overview]
Message-ID: <1227871814.4454.3855.camel@twins> (raw)
In-Reply-To: <20081128060803.73cd59bd@bree.surriel.com>

On Fri, 2008-11-28 at 06:08 -0500, Rik van Riel wrote:
> Skip freeing memory from zones that already have lots of free memory.
> If one memory zone has harder to free memory, we want to avoid freeing
> excessive amounts of memory from other zones, if only because pageout
> IO from the other zones can slow down page freeing from the problem zone.
> 
> This is similar to the check already done by kswapd in balance_pgdat().
> 
> Signed-off-by: Rik van Riel <riel@redhat.com>

Make sense,

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

> ---
> Kosaki-san, this should address point (3) from your list.
> 
>  mm/vmscan.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> Index: linux-2.6.28-rc5/mm/vmscan.c
> ===================================================================
> --- linux-2.6.28-rc5.orig/mm/vmscan.c	2008-11-28 05:53:56.000000000 -0500
> +++ linux-2.6.28-rc5/mm/vmscan.c	2008-11-28 06:05:29.000000000 -0500
> @@ -1510,6 +1510,9 @@ static unsigned long shrink_zones(int pr
>  			if (zone_is_all_unreclaimable(zone) &&
>  						priority != DEF_PRIORITY)
>  				continue;	/* Let kswapd poll it */
> +			if (zone_watermark_ok(zone, sc->order,
> +					4*zone->pages_high, high_zoneidx, 0))
> +				continue;	/* Lots free already */
>  			sc->all_unreclaimable = 0;
>  		} else {
>  			/*
> 
> --
> 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>

--
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:[~2008-11-28 11:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-28 11:08 Rik van Riel
2008-11-28 11:30 ` Peter Zijlstra [this message]
2008-11-28 22:43 ` Johannes Weiner
2008-11-29  7:19 ` Andrew Morton
2008-11-29 10:55   ` KOSAKI Motohiro
2008-12-08 13:00     ` KOSAKI Motohiro
2008-12-08 13:03       ` KOSAKI Motohiro
2008-12-08 17:48         ` KOSAKI Motohiro
2008-12-10  5:07           ` Nick Piggin
2008-12-08 20:25         ` Rik van Riel
2008-12-10  5:09           ` Nick Piggin
2008-12-12  5:50           ` KOSAKI Motohiro
2008-11-29 16:47   ` Rik van Riel
2008-11-29 17:45     ` Andrew Morton
2008-11-29 17:58       ` Rik van Riel
2008-11-29 18:26         ` Andrew Morton
2008-11-29 18:41           ` Rik van Riel
2008-11-29 18:51             ` Andrew Morton
2008-11-29 18:59               ` Rik van Riel
2008-11-29 20:29                 ` Andrew Morton
2008-11-29 21:35                   ` Rik van Riel
2008-11-29 21:57                     ` Andrew Morton
2008-11-29 22:07                       ` Rik van Riel

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=1227871814.4454.3855.camel@twins \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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