linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Andy Whitcroft <apw@shadowen.org>
Cc: Mel Gorman <mel@skynet.ie>, Nick Piggin <nickpiggin@yahoo.com.au>,
	Linux Memory Management <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: zone movable patches comments
Date: Tue, 10 Jul 2007 20:03:21 +0900	[thread overview]
Message-ID: <20070710200321.e8b38a7a.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <469355D4.1070008@shadowen.org>

On Tue, 10 Jul 2007 10:48:04 +0100
Andy Whitcroft <apw@shadowen.org> wrote:


> I would have expected all of the is_zonename() checks to include the
> zone_is_configured() checks, to allow the optimiser to catch on and
> elide the code.
> 
>     if (zone_is_configured(ZONE_DMA32)
> 	return zone == zone->zone_pgdat->node_zones + ZONE_DMA32;
>     else
> 	return 0;
> 
> Perhaps a little helper:
> 
> static inline zone_idx_is(int idx, int target)
> {
> 	if (zone_is_configured(target))
> 		return idx == target;
> 	else
> 		return 0;
> }
> 
Ah, this looks nice. 


> You are able to always assign these as the array is sized on
> MAX_POSSIBLE_ZONES, so I would have thought that these could be
> statically initialised right?
> 
> static char * const zone_names = {
> [ZONE_DMA] = "DMA",
> [ZONE_DMA32] = "DMA32",
> ...
> };
> 
> 
> And in fact if you were to simply size sysctl_lowmem_reserve_ratio at
> MAX_POSSIBLE_ZONES could you not do the same there too?  Then you would
> not need to introduce zone_variables_init().
> 
> int sysctl_lowmem_reserve_ratio[MAX_POSSIBLE_ZONES] = {
> [ZONE_DMA] = 256,
> [ZONE_DMA32] = 256,
> [ZONE_HIGHMEM] = 32
> };
> 
Oh, it's simpler. thank you.

-Kame

--
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:[~2007-07-10 11:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-09  7:50 Nick Piggin
2007-07-09 10:30 ` KAMEZAWA Hiroyuki
2007-07-09 11:04 ` Mel Gorman
2007-07-09 11:44   ` KAMEZAWA Hiroyuki
2007-07-09 12:15   ` Nick Piggin
2007-07-09 13:21     ` Mel Gorman
2007-07-10  7:57       ` Nick Piggin
2007-07-10  9:21         ` Andy Whitcroft
2007-07-10  9:54           ` Yasunori Goto
2007-07-10 10:12             ` Andy Whitcroft
2007-07-10  9:51         ` Mel Gorman
2007-07-10 10:16           ` Nick Piggin
2007-07-10 10:18             ` Nick Piggin
2007-07-10 13:21               ` Mel Gorman
2007-07-12 12:11                 ` Andy Whitcroft
2007-07-10  9:08       ` KAMEZAWA Hiroyuki
2007-07-10  9:48         ` Andy Whitcroft
2007-07-10 11:03           ` KAMEZAWA Hiroyuki [this message]
2007-07-09 17:39   ` 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=20070710200321.e8b38a7a.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@skynet.ie \
    --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