All of lore.kernel.org
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>, Dave Hansen <haveblue@us.ibm.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] remove zone_mem_map
Date: Wed, 22 Feb 2006 12:25:09 +0900	[thread overview]
Message-ID: <43FBD995.20601@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0602211900450.23557@schroedinger.engr.sgi.com>

Christoph Lameter wrote:
> On Wed, 22 Feb 2006, KAMEZAWA Hiroyuki wrote:
> 
>> This patch removes zone_mem_map.
> 
> Note that IA64 does not seem to depend on zone_mem_map...
> 
Oh, yes. ia64 doesn't includes asm-generic/memory_model.h when DISCONTIGMEM.

>> Index: test/include/asm-generic/memory_model.h
>> ===================================================================
>> --- test.orig/include/asm-generic/memory_model.h
>> +++ test/include/asm-generic/memory_model.h
>> @@ -47,9 +47,9 @@ extern unsigned long page_to_pfn(struct
>>
>>  #define page_to_pfn(pg)			\
>>  ({	struct page *__pg = (pg);		\
>> -	struct zone *__zone = page_zone(__pg);	\
>> -	(unsigned long)(__pg - __zone->zone_mem_map) +	\
>> -	 __zone->zone_start_pfn;			\
>> +	struct pglist_data *__pgdat = NODE_DATA(page_to_nid(__pg));	\
>> +	(unsigned long)(__pg - __pgdat->node_mem_map) +	\
>> +	 __pgdat->node_start_pfn;			\
>>  })
> 
> NODE_DATA is an arch specific lookup, If it always is a table lookup
> then the performance will be comparable to page_zone because that also 
> involves one table lookup.
> 
There are several types of NODE_DATA definitions.
1. #define NODE_DATA(node)	(&node_data[node]) alpha,arm,
2. #define NODE_DATA(node)      (node_data[node]) i386,powerpc,x86_64,m32r
3. #define NODE_DATA(node)	(&node_data[node]->pgdat) parisc,mips
4. #define NODE_DATA(node)	(per-cpu-page has node_data[nid] pointer array) ia64

BTW, ia64 looks very special. Does it make sensible performance gain ?

-- Kame


WARNING: multiple messages have this Message-ID (diff)
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>, Dave Hansen <haveblue@us.ibm.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] remove zone_mem_map
Date: Wed, 22 Feb 2006 12:25:09 +0900	[thread overview]
Message-ID: <43FBD995.20601@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0602211900450.23557@schroedinger.engr.sgi.com>

Christoph Lameter wrote:
> On Wed, 22 Feb 2006, KAMEZAWA Hiroyuki wrote:
> 
>> This patch removes zone_mem_map.
> 
> Note that IA64 does not seem to depend on zone_mem_map...
> 
Oh, yes. ia64 doesn't includes asm-generic/memory_model.h when DISCONTIGMEM.

>> Index: test/include/asm-generic/memory_model.h
>> ===================================================================
>> --- test.orig/include/asm-generic/memory_model.h
>> +++ test/include/asm-generic/memory_model.h
>> @@ -47,9 +47,9 @@ extern unsigned long page_to_pfn(struct
>>
>>  #define page_to_pfn(pg)			\
>>  ({	struct page *__pg = (pg);		\
>> -	struct zone *__zone = page_zone(__pg);	\
>> -	(unsigned long)(__pg - __zone->zone_mem_map) +	\
>> -	 __zone->zone_start_pfn;			\
>> +	struct pglist_data *__pgdat = NODE_DATA(page_to_nid(__pg));	\
>> +	(unsigned long)(__pg - __pgdat->node_mem_map) +	\
>> +	 __pgdat->node_start_pfn;			\
>>  })
> 
> NODE_DATA is an arch specific lookup, If it always is a table lookup
> then the performance will be comparable to page_zone because that also 
> involves one table lookup.
> 
There are several types of NODE_DATA definitions.
1. #define NODE_DATA(node)	(&node_data[node]) alpha,arm,
2. #define NODE_DATA(node)      (node_data[node]) i386,powerpc,x86_64,m32r
3. #define NODE_DATA(node)	(&node_data[node]->pgdat) parisc,mips
4. #define NODE_DATA(node)	(per-cpu-page has node_data[nid] pointer array) ia64

BTW, ia64 looks very special. Does it make sensible performance gain ?

-- 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:[~2006-02-22  3:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-22  0:22 [PATCH] remove zone_mem_map KAMEZAWA Hiroyuki
2006-02-22  0:22 ` KAMEZAWA Hiroyuki
2006-02-22  2:33 ` Andrew Morton
2006-02-22  2:33   ` Andrew Morton
2006-02-22  2:52   ` KAMEZAWA Hiroyuki
2006-02-22  2:52     ` KAMEZAWA Hiroyuki
2006-02-22  3:04 ` Christoph Lameter
2006-02-22  3:04   ` Christoph Lameter
2006-02-22  3:25   ` KAMEZAWA Hiroyuki [this message]
2006-02-22  3:25     ` KAMEZAWA Hiroyuki
2006-02-22  3:41     ` Christoph Lameter
2006-02-22  3:41       ` Christoph Lameter
2006-02-22  3:52       ` KAMEZAWA Hiroyuki
2006-02-22  3:52         ` KAMEZAWA Hiroyuki

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=43FBD995.20601@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.