From: Christoph Lameter <clameter@engr.sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: nickpiggin@yahoo.com.au, marcelo.tosatti@cyclades.com,
linux-mm@kvack.org
Subject: Re: Get rid of scan_control
Date: Sat, 11 Feb 2006 22:49:38 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.62.0602112225190.26166@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20060211213707.0ef39582.akpm@osdl.org>
On Sat, 11 Feb 2006, Andrew Morton wrote:
> Andrew Morton <akpm@osdl.org> wrote:
> >
> > Returning nr_reclaimed up and down the stack makes sense too - I'll try that.
>
> wtf does this, in zone_reclaim() do?
>
> sc.nr_reclaimed = 1; /* Avoid getting the off node timeout */
The number of pages returned from slab_reclaim is global and not per zone.
(we need to find a way to fix that if we want to enable per zone slab
reclaim during zone reclaim operations by defaut... and if we had zoned vm
counters we could also avoid this situation)
So the number of reclaimed slab pages cannot be used to determine if we
should go off node. sc.nr_reclaimed has some weird value after shrink_slab
is through.
Hmmm. Setting this to one means that we will rescan and shrink the slab
for each allocation if we are out of zone memory and RECLAIM_SLAB is set.
Plus if we do an order 0 allocation we do not go off node as intended.
We better set this to zero. This means the allocation will go offnode
despite us having potentially freed lots of memory on the zone.
Future allocations can then again be done from this zone.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.16-rc2/mm/vmscan.c
===================================================================
--- linux-2.6.16-rc2.orig/mm/vmscan.c 2006-02-11 14:22:07.000000000 -0800
+++ linux-2.6.16-rc2/mm/vmscan.c 2006-02-11 22:42:13.000000000 -0800
@@ -1909,13 +1909,13 @@ int zone_reclaim(struct zone *zone, gfp_
/*
* shrink_slab does not currently allow us to determine
* how many pages were freed in the zone. So we just
- * shake the slab and then go offnode for a single allocation.
+ * shake the slab.
*
* shrink_slab will free memory on all zones and may take
* a long time.
*/
shrink_slab(sc.nr_scanned, gfp_mask, order);
- sc.nr_reclaimed = 1; /* Avoid getting the off node timeout */
+ sc.nr_reclaimed = 0;
}
p->reclaim_state = NULL;
--
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:[~2006-02-12 6:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-10 5:02 Christoph Lameter
2006-02-11 4:53 ` Marcelo Tosatti
2006-02-11 9:32 ` Andrew Morton
2006-02-11 9:46 ` Andrew Morton
2006-02-12 3:33 ` Nick Piggin
2006-02-12 3:47 ` Christoph Lameter
2006-02-12 4:08 ` Nick Piggin
2006-02-12 4:41 ` Christoph Lameter
2006-02-12 5:01 ` Nick Piggin
2006-02-12 5:14 ` Andrew Morton
2006-02-12 5:37 ` Andrew Morton
2006-02-12 6:49 ` Christoph Lameter [this message]
2006-02-12 7:53 ` Andrew Morton
2006-02-13 17:54 ` Christoph Lameter
2006-02-12 6:25 ` Christoph Lameter
2006-02-11 19:01 ` Christoph Lameter
2006-02-11 21:13 ` Andrew Morton
2006-02-11 21:27 ` Christoph Lameter
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=Pine.LNX.4.62.0602112225190.26166@schroedinger.engr.sgi.com \
--to=clameter@engr.sgi.com \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=nickpiggin@yahoo.com.au \
/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