public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] - Make pfn_valid more precise for SGI Altix systems
@ 2005-11-09 20:25 Dean Roe
  2005-11-09 23:24 ` Luck, Tony
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dean Roe @ 2005-11-09 20:25 UTC (permalink / raw)
  To: linux-ia64

A single SGI Altix system can be divided into multiple partitions,
each running their own instance of the Linux kernel.  pfn_valid()
is currently not optimal for any but the first partition, since it
does not compare the pfn with min_low_pfn before calling the more
costly ia64_pfn_valid().

	Signed-off-by: Dean Roe <roe@sgi.com>



Index: linux-ia64-test/arch/ia64/kernel/ia64_ksyms.c
=================================--- linux-ia64-test.orig/arch/ia64/kernel/ia64_ksyms.c	2005-11-09 14:10:17.473464250 -0600
+++ linux-ia64-test/arch/ia64/kernel/ia64_ksyms.c	2005-11-09 14:10:50.800226042 -0600
@@ -42,6 +42,7 @@
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
 #include <linux/bootmem.h>
+EXPORT_SYMBOL(min_low_pfn);	/* defined by bootmem.c, but not exported by generic code */
 EXPORT_SYMBOL(max_low_pfn);	/* defined by bootmem.c, but not exported by generic code */
 #endif
 
Index: linux-ia64-test/include/asm-ia64/page.h
=================================--- linux-ia64-test.orig/include/asm-ia64/page.h	2005-11-09 14:10:17.484205369 -0600
+++ linux-ia64-test/include/asm-ia64/page.h	2005-11-09 14:10:50.803155438 -0600
@@ -112,8 +112,9 @@
 # define pfn_to_page(pfn)	(mem_map + (pfn))
 #elif defined(CONFIG_DISCONTIGMEM)
 extern struct page *vmem_map;
+extern unsigned long min_low_pfn;
 extern unsigned long max_low_pfn;
-# define pfn_valid(pfn)		(((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
+# define pfn_valid(pfn)		(((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
 # define page_to_pfn(page)	((unsigned long) (page - vmem_map))
 # define pfn_to_page(pfn)	(vmem_map + (pfn))
 #endif


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-11-10 16:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-09 20:25 [PATCH] - Make pfn_valid more precise for SGI Altix systems Dean Roe
2005-11-09 23:24 ` Luck, Tony
2005-11-09 23:34 ` Luck, Tony
2005-11-10 16:19 ` Dean Roe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox