From: Andy Whitcroft <apw@shadowen.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@osdl.org, linux-mm@kvack.org,
Lee Schermerhorn <Lee.Schermerhorn@hp.com>,
ak@suse.de
Subject: Re: linearly index zone->node_zonelists[]
Date: Tue, 08 Aug 2006 13:20:31 +0100 [thread overview]
Message-ID: <44D8818F.3080703@shadowen.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0608041656150.5573@schroedinger.engr.sgi.com>
Christoph Lameter wrote:
> I wonder why we need this bitmask indexing into zone->node_zonelists[]?
>
> We always start with the highest zone and then include all lower zones
> if we build zonelists.
>
> Are there really cases where we need allocation from ZONE_DMA or
> ZONE_HIGHMEM but not ZONE_NORMAL? It seems that the current implementation
> of highest_zone() makes that already impossible.
>
> If we go linear on the index then gfp_zone() == highest_zone() and a lot
> of definitions fall by the wayside.
>
> We can now revert back to the use of gfp_zone() in mempolicy.c ;-)
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
We have had patches to do this very change before and they were
rejected. I can't of course find them to get the reasoning, but this is
my memory.
The GFP_foo flags are modifiers specifying some property we require from
an allocation. Currently all modifiers are singletons, that is they are
all specified in isolation. However, the code base as it stands does
not enforce this. I could see use cases where we might want to specify
more than one flag. For example a GFP_NODE_LOCAL flags which could be
specified with any of the 'zone selectors'. This would naturally work
with the current implementation.
Making the change you suggest here codifies the singleton status of
these bits. We should be sure we are not going to use this feature
before its removed. I am not sure I am comfortable saying there are no
uses for it.
-apw
--
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-08-08 12:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 23:54 mempolicies: fix policy_zone check Christoph Lameter
2006-08-04 23:55 ` Apply type enum zone_type Christoph Lameter
2006-08-04 23:57 ` linearly index zone->node_zonelists[] Christoph Lameter
2006-08-05 1:50 ` Andi Kleen
2006-08-08 12:20 ` Andy Whitcroft [this message]
2006-08-08 15:50 ` Christoph Lameter
2006-08-05 1:38 ` Apply type enum zone_type Andi Kleen
2006-08-05 2:01 ` Christoph Lameter
2006-08-05 0:08 ` mempolicies: fix policy_zone check Andrew Morton
2006-08-05 0:18 ` Christoph Lameter
2006-08-07 13:40 ` Lee Schermerhorn
2006-08-05 1:49 ` Andi Kleen
2006-08-05 2:05 ` Christoph Lameter
2006-08-08 12:00 ` Andy Whitcroft
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=44D8818F.3080703@shadowen.org \
--to=apw@shadowen.org \
--cc=Lee.Schermerhorn@hp.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-mm@kvack.org \
/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