* [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
* Re: [PATCH] fix CONFIG_DISCONTIGMEM and CONFIG_VIRTUAL_MEMMAP
2004-09-05 15:33 [PATCH] fix CONFIG_DISCONTIGMEM and CONFIG_VIRTUAL_MEMMAP Jesse Barnes
@ 2004-09-06 2:11 ` Ian Wienand
0 siblings, 0 replies; 2+ messages in thread
From: Ian Wienand @ 2004-09-06 2:11 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
On Sun, Sep 05, 2004 at 08:33:46AM -0700, Jesse Barnes wrote:
> 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.
Guilty as charged, I only checked it on my machine.
If performance isn't an issue [*], for mine, combining the the two
seems like the most logical thing to do to me, as it is only causing
confusion with the two being apart. Setting myself the simple goal of
running with discontig and virtual mem map without NUMA, the diffstat
of the patch looks like
Makefile | 2
arch/ia64/Kconfig | 4
arch/ia64/mm/discontig.c | 180 ++-----------------------------------------
arch/ia64/mm/numa.c | 171 ++++++++++++++++++++++++++++++++++++++++
include/asm-ia64/meminit.h | 2
include/asm-ia64/processor.h | 4
6 files changed, 189 insertions(+), 174 deletions(-)
Most of that is copy-paste moving of a few things from discontig.c to
in numa.c. My point is that it probably isn't too hard (but I guess
that's probably not news).
-i
[*] I'm always happy to run any benchmarks you want on the machines we
have.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ 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