* [PATCH] UML - Error message improvement
@ 2004-09-23 2:24 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2004-09-23 2:24 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, blaisorblade_spam
Output a nice error message for people who need mem > 256M but don't increase
on the host /proc/sys/vm/max_map_count, telling them to do so.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Index: linux-2.6.9-rc2-mm1-orig/arch/um/kernel/physmem.c
===================================================================
--- linux-2.6.9-rc2-mm1-orig.orig/arch/um/kernel/physmem.c 2004-09-22 19:51:02.000000000 -0400
+++ linux-2.6.9-rc2-mm1-orig/arch/um/kernel/physmem.c 2004-09-22 20:34:22.000000000 -0400
@@ -336,9 +336,14 @@
fd = phys_mapping(phys, &offset);
err = os_map_memory((void *) virt, fd, offset, len, r, w, x);
- if(err)
+ if(err) {
+ if(err == -ENOMEM)
+ printk("try increasing the host's "
+ "/proc/sys/vm/max_map_count to <physical "
+ "memory size>/4096\n");
panic("map_memory(0x%lx, %d, 0x%llx, %ld, %d, %d, %d) failed, "
"err = %d\n", virt, fd, offset, len, r, w, x, err);
+ }
}
#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-23 1:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 2:24 [PATCH] UML - Error message improvement Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®