From: Christoph Lameter <clameter@sgi.com>
To: Andi Kleen <ak@suse.de>
Cc: akpm@osdl.org, linux-mm@kvack.org,
Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Subject: Re: mempolicies: fix policy_zone check
Date: Fri, 4 Aug 2006 19:05:31 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0608041901260.6160@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <200608050349.49114.ak@suse.de>
On Sat, 5 Aug 2006, Andi Kleen wrote:
> On Saturday 05 August 2006 01:54, Christoph Lameter wrote:
>
> > So move the highest_zone() function from mm/page_alloc.c into
> > include/linux/gfp.h. On the way we simplify the function and use the new
> > zone_type that was also introduced with the zone reduction patchset plus we
> > also specify the right type for the gfp flags parameter.
>
> The function is a bit big to inline. Better keep it in page_alloc.c, but
> make it global.
Basically we have a maximum of 2 comparisons (no architecture
supports 4 zones) in the function with a simple constant return.
Most modern processors can do that kind of thing inline without jumps and
its just a few instructions (likely less than a function call). On most
platforms that only support DMA and NORMAL we only have a single
comparison.
Also having that function inline allows optimizations if the gfp flag is
partially or fully known. If the compiler sees
gfp_zone(__GFP_HIGHMEM | blablabla) then it can substitute ZONE_HIGHMEM .
gfp_zone(GFP_USER) can be determined at compile time etc.
--
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-05 2:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-04 23:54 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
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 [this message]
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=Pine.LNX.4.64.0608041901260.6160@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=Lee.Schermerhorn@hp.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--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