Thread (16 messages) 16 messages, 8 authors, 2005-08-25

Re: [PATCH] gurantee DMA area for alloc_bootmem_low() ver. 2.

From: Yasunori Goto <hidden>
Date: 2005-08-25 09:15:21

Hello. Andrew-san.

I could rent a x86_64 box, and tried this panic.
But, it hasn't occurred in my box.
Could you add following patch and retry with my previous one
to get more information?

Your .config didn't set CONFIG_NUMA, so kernel tried allocation
just one node which had all of memory.
And your console message displayed that required size was 67Mbytes.
Now, I guess that one function called alloc_bootmem_low() 
by size = 67Mbytes. But, it is impossible because x86_64's DMA area
size is just 16Mbytes. So, caller got "non DMA" area in spite of
its requirement in current code, but my patch refused it and panic was
occured.

I would like to make sure my assumption and would like to know
which function call it.

Thanks.


Signed-off-by: Yasunori Goto <redacted>
---

 alloc_bootmem-goto/mm/bootmem.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN mm/bootmem.c~info mm/bootmem.c
--- alloc_bootmem/mm/bootmem.c~info	2005-08-24 20:30:57.000000000 +0900
+++ alloc_bootmem-goto/mm/bootmem.c	2005-08-24 20:38:12.000000000 +0900
@@ -410,7 +410,9 @@ void * __init __alloc_bootmem (unsigned 
 	/*
 	 * Whoops, we cannot satisfy the allocation request.
 	 */
-	printk(KERN_ALERT "bootmem alloc of %lu bytes failed!\n", size);
+	printk(KERN_ALERT "bootmem alloc of %lu bytes %s failed!\n",
+	       size, goal < max_dma_physaddr() ? "DMA" : "No DMA");
+	dump_stack();
 	panic("Out of memory");
 	return NULL;
 }
_

-- 
Yasunori Goto 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help