Re: align vmemmap to ia64's granule

From: Hiroyuki KAMEZAWA <kamezawa.hiroyu_at_jp.fujitsu.com>
Date: 2004-10-07 16:51:15
Hi, Tony

This patch make vmemmap to be aligned with ia64's granule size, against 2.6.9-rc3.
Please apply this, if vmemmap is expected to be aligned with the granule size.

Kame <kamezawa.hiroyu@jp.fujitsu.com>

Hiroyuki KAMEZAWA wrote:
> Hi,
> Luck, Tony wrote:
> 
>>> Because pfn_valid() often returns 0 in inner loop of free_pages_bulk(),
>>> I want to avoid page fault caused by using get_user() in pfn_valid().
>>
>>
>>
>> How often?  Surely this is only a problem at the edges of blocks
>> of memory?  I suppose it depends on whether your discontig memory
>> appears in blocks much smaller than MAXORDER.  But even there it
>> should only be an issue coalescing buddies that are bigger than
>> the granule size (since all of the pages in a granule on ia64 are
>> guaranteed to exist, the buddy of any page must also exist).

> node's start_pfn and end_pfn is aligned to granule size, but holes in 
> memmap is not.
> The vmemmap is aligned to # of page structs in one page.


---

  test-kernel-kamezawa/arch/ia64/mm/init.c |    2 ++
  1 files changed, 2 insertions(+)

diff -puN arch/ia64/mm/init.c~vmemmap_align_granule arch/ia64/mm/init.c
--- test-kernel/arch/ia64/mm/init.c~vmemmap_align_granule	2004-10-07 15:24:08.322733968 +0900
+++ test-kernel-kamezawa/arch/ia64/mm/init.c	2004-10-07 15:30:58.623358792 +0900
@@ -411,6 +411,8 @@ virtual_memmap_init (u64 start, u64 end,

  	args = (struct memmap_init_callback_data *) arg;

+	start = GRANULEROUNDDOWN(start);
+	end  = GRANULEROUNDUP(end);
  	map_start = vmem_map + (__pa(start) >> PAGE_SHIFT);
  	map_end   = vmem_map + (__pa(end) >> PAGE_SHIFT);


_


-- 
--the clue is these footmarks leading to the door.--
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Oct 7 02:45:54 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:31 EST