From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jack Steiner <steiner@sgi.com>
Cc: Linux Memory Management <linux-mm@kvack.org>
Subject: Re: [patch 1/4] pcp: zonequeues
Date: Sun, 10 Apr 2005 01:25:32 +1000 [thread overview]
Message-ID: <4257F3EC.1000901@yahoo.com.au> (raw)
In-Reply-To: <4257D74C.3010703@yahoo.com.au>
Nick Piggin wrote:
> Hi Jack,
> Was thinking about some problems in this area, and I hacked up
> a possible implementation to improve things.
>
> 1/4 switches the per cpu pagesets in struct zone to a single list
> of zone pagesets for each CPU.
>
Just thinking out loud here... this patch (or something like it)
would probably be a good idea regardless of the remote pageset
removal patches following it.
Shouldn't be any changes in behaviour, but it gives you remote
pagesets in local memory and hopefully better cache behaviour due
to less packing needed, and the use of percpu.
But...
> +
> +struct per_cpu_zone_stats {
> unsigned long numa_hit; /* allocated in intended node */
> unsigned long numa_miss; /* allocated in non intended node */
> unsigned long numa_foreign; /* was intended here, hit elsewhere */
> unsigned long interleave_hit; /* interleaver prefered this zone */
> unsigned long local_node; /* allocation from local node */
> unsigned long other_node; /* allocation from other node */
> -#endif
> } ____cacheline_aligned_in_smp;
>
> #define ZONE_DMA 0
> @@ -113,16 +114,19 @@ struct zone {
> unsigned long free_pages;
> unsigned long pages_min, pages_low, pages_high;
> /*
> - * We don't know if the memory that we're going to allocate will be freeable
> - * or/and it will be released eventually, so to avoid totally wasting several
> - * GB of ram we must reserve some of the lower zone memory (otherwise we risk
> - * to run OOM on the lower zones despite there's tons of freeable ram
> - * on the higher zones). This array is recalculated at runtime if the
> - * sysctl_lowmem_reserve_ratio sysctl changes.
> + * We don't know if the memory that we're going to allocate will be
> + * freeable or/and it will be released eventually, so to avoid totally
> + * wasting several GB of ram we must reserve some of the lower zone
> + * memory (otherwise we risk to run OOM on the lower zones despite
> + * there's tons of freeable ram on the higher zones). This array is
> + * recalculated at runtime if the sysctl_lowmem_reserve_ratio sysctl
> + * changes.
> */
> unsigned long lowmem_reserve[MAX_NR_ZONES];
>
> - struct per_cpu_pageset pageset[NR_CPUS];
> +#ifdef CONFIG_NUMA
> + struct per_cpu_zone_stats stats[NR_CPUS];
> +#endif
>
I wonder if this stats information should be in the pageset there
in local memory as well? I initially moved it to its own structure
so that the zone queues could be completely confined to page_alloc.
--
SUSE Labs, Novell Inc.
--
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:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2005-04-09 15:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-09 13:23 Nick Piggin
2005-04-09 13:24 ` [patch 2/4] pcp: dynamic lists Nick Piggin
2005-04-09 13:24 ` [patch 3/4] pcp: NULL pagesets Nick Piggin
2005-04-09 13:25 ` [patch 4/4] pcp: only local pagesets Nick Piggin
2005-04-09 13:28 ` [patch 1/4] pcp: zonequeues Nick Piggin
2005-04-09 15:25 ` Nick Piggin [this message]
2005-04-12 16:15 ` Jack Steiner
2005-04-13 1:34 ` Nick Piggin
2005-04-12 19:02 ` Christoph Lameter
2005-04-13 1:40 ` Nick Piggin
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=4257F3EC.1000901@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=linux-mm@kvack.org \
--cc=steiner@sgi.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