public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix CONFIG_DISCONTIGMEM and CONFIG_VIRTUAL_MEMMAP
@ 2004-09-05 15:33 Jesse Barnes
  2004-09-06  2:11 ` Ian Wienand
  0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2004-09-05 15:33 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

Looks like the patch that fixed Ian's problem introduced an ugly warning.  
Maybe we could just switch to requiring CONFIG_DISCONTIGMEM and 
CONFIG_VIRTUAL_MEMMAP for ia64 in general?  That would let us kill a lot of 
code and only have one code path, etc.  Benchmarks have shown that the 
overhead of CONFIG_DISCONTIGMEM is very difficult to measure (if you look at 
the code, the only added overhead in any fast path is an additional pointer 
dereference in alloc_pages).  CONFIG_VIRTUAL_MEMMAP is a little more 
expensive iirc, but still difficult to measure.

Jesse

[-- Attachment #2: virtual-memmap+discontig-fix.patch --]
[-- Type: text/x-diff, Size: 966 bytes --]

===== include/asm-ia64/page.h 1.27 vs edited =====
--- 1.27/include/asm-ia64/page.h	2004-09-02 22:25:57 -07:00
+++ edited/include/asm-ia64/page.h	2004-09-05 08:28:38 -07:00
@@ -89,11 +89,11 @@
 #  define pfn_valid(pfn)       (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
 #  define page_to_pfn(page)    ((unsigned long) (page - vmem_map))
 #  define pfn_to_page(pfn)     (vmem_map + (pfn))
-# endif
-#else /* !CONFIG_VIRTUAL_MEM_MAP */
-#define pfn_valid(pfn)		(((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
-#define page_to_pfn(page)	((unsigned long) (page - mem_map))
-#define pfn_to_page(pfn)	(mem_map + (pfn))
+# else /* !CONFIG_VIRTUAL_MEM_MAP */
+#  define pfn_valid(pfn)		(((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
+#  define page_to_pfn(page)	((unsigned long) (page - mem_map))
+#  define pfn_to_page(pfn)	(mem_map + (pfn))
+# endif /* CONFIG_VIRTUAL_MEMMAP */
 #endif /* CONFIG_DISCONTIGMEM */
 
 #define page_to_phys(page)	(page_to_pfn(page) << PAGE_SHIFT)

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

end of thread, other threads:[~2004-09-06  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-05 15:33 [PATCH] fix CONFIG_DISCONTIGMEM and CONFIG_VIRTUAL_MEMMAP Jesse Barnes
2004-09-06  2:11 ` Ian Wienand

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