* Slab panic on 2.6.19-rc3-git5 (-git4 was OK)
@ 2006-10-29 5:57 Martin J. Bligh
2006-10-29 6:58 ` Pekka Enberg
2006-10-29 7:05 ` Andrew Morton
0 siblings, 2 replies; 14+ messages in thread
From: Martin J. Bligh @ 2006-10-29 5:57 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: linux-mm, Andy Whitcroft, Linus Torvalds
-git4 was fine. -git5 is broken (on PPC64 blade)
As -rc2-mm2 seemed fine on this box, I'm guessing it's something
that didn't go via Andrew ;-( Looks like it might be something
JFS or slab specific. Bigger PPC64 box with different config
was OK though.
Full log is here: http://test.kernel.org/abat/59046/debug/console.log
Good -git4 run: http://test.kernel.org/abat/58997/debug/console.log
kernel BUG in cache_grow at mm/slab.c:2705!
cpu 0x1: Vector: 700 (Program Check) at [c0000000fffb7710]
pc: c0000000000c8ad4: .cache_grow+0x64/0x4f0
lr: c0000000000c91a8: .cache_alloc_refill+0x248/0x2cc
sp: c0000000fffb7990
msr: 8000000000021032
current = 0xc0000000fffab800
paca = 0xc00000000047e780
pid = 1, comm = swapper
kernel BUG in cache_grow at mm/slab.c:2705!
enter ? for help
[c0000000fffb7a60] c0000000000c91a8 .cache_alloc_refill+0x248/0x2cc
[c0000000fffb7b20] c0000000000c9708 .kmem_cache_alloc_node+0xd0/0x10c
[c0000000fffb7bc0] c0000000000b69cc .__get_vm_area_node+0xcc/0x230
[c0000000fffb7c70] c0000000000b7640 .__vmalloc_node+0x60/0xc0
[c0000000fffb7d10] c0000000001ad4c8 .txInit+0x2a0/0x3a8
[c0000000fffb7e20] c00000000044c1ec .init_jfs_fs+0x78/0x27c
[c0000000fffb7ec0] c0000000000094c0 .init+0x1f4/0x3e4
[c0000000fffb7f90] c000000000027270 .kernel_thread+0x4c/0x68
--
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>
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 5:57 Slab panic on 2.6.19-rc3-git5 (-git4 was OK) Martin J. Bligh @ 2006-10-29 6:58 ` Pekka Enberg 2006-10-29 12:46 ` Giridhar Pemmasani 2006-10-29 7:05 ` Andrew Morton 1 sibling, 1 reply; 14+ messages in thread From: Pekka Enberg @ 2006-10-29 6:58 UTC (permalink / raw) To: Martin J. Bligh Cc: Linux Kernel Mailing List, linux-mm, Andy Whitcroft, Linus Torvalds, pgiri, Andrew Morton Hi, On 10/29/06, Martin J. Bligh <mbligh@google.com> wrote: > -git4 was fine. -git5 is broken (on PPC64 blade) > > As -rc2-mm2 seemed fine on this box, I'm guessing it's something > that didn't go via Andrew ;-( Looks like it might be something > JFS or slab specific. Bigger PPC64 box with different config > was OK though. > > Full log is here: http://test.kernel.org/abat/59046/debug/console.log > Good -git4 run: http://test.kernel.org/abat/58997/debug/console.log > > kernel BUG in cache_grow at mm/slab.c:2705! > cpu 0x1: Vector: 700 (Program Check) at [c0000000fffb7710] > pc: c0000000000c8ad4: .cache_grow+0x64/0x4f0 > lr: c0000000000c91a8: .cache_alloc_refill+0x248/0x2cc > sp: c0000000fffb7990 > msr: 8000000000021032 > current = 0xc0000000fffab800 > paca = 0xc00000000047e780 > pid = 1, comm = swapper > kernel BUG in cache_grow at mm/slab.c:2705! > enter ? for help > [c0000000fffb7a60] c0000000000c91a8 .cache_alloc_refill+0x248/0x2cc > [c0000000fffb7b20] c0000000000c9708 .kmem_cache_alloc_node+0xd0/0x10c > [c0000000fffb7bc0] c0000000000b69cc .__get_vm_area_node+0xcc/0x230 > [c0000000fffb7c70] c0000000000b7640 .__vmalloc_node+0x60/0xc0 > [c0000000fffb7d10] c0000000001ad4c8 .txInit+0x2a0/0x3a8 > [c0000000fffb7e20] c00000000044c1ec .init_jfs_fs+0x78/0x27c > [c0000000fffb7ec0] c0000000000094c0 .init+0x1f4/0x3e4 > [c0000000fffb7f90] c000000000027270 .kernel_thread+0x4c/0x68 I only skimmed through this briefly but it looks like due to 52fd24ca1db3a741f144bbc229beefe044202cac __get_vm_area_node is passing GFP_HIGHMEM to kmem_cache_alloc_node which is a no-no. -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 6:58 ` Pekka Enberg @ 2006-10-29 12:46 ` Giridhar Pemmasani 2006-10-29 15:21 ` Martin J. Bligh 0 siblings, 1 reply; 14+ messages in thread From: Giridhar Pemmasani @ 2006-10-29 12:46 UTC (permalink / raw) To: Pekka Enberg, Martin J. Bligh Cc: Linux Kernel Mailing List, linux-mm, Andy Whitcroft, Linus Torvalds, pgiri, Andrew Morton [-- Attachment #1: Type: text/plain, Size: 3056 bytes --] > Hi, > > On 10/29/06, Martin J. Bligh <mbligh@google.com> wrote: > > -git4 was fine. -git5 is broken (on PPC64 blade) > > > > As -rc2-mm2 seemed fine on this box, I'm guessing it's something > > that didn't go via Andrew ;-( Looks like it might be something > > JFS or slab specific. Bigger PPC64 box with different config > > was OK though > > > > Full log is here: http://test.kernel.org/abat/59046/debug/console.log > > Good -git4 run: http://test.kernel.org/abat/58997/debug/console.log > > > > kernel BUG in cache_grow at mm/slab.c:2705! > > cpu 0x1: Vector: 700 (Program Check) at [c0000000fffb7710] > > pc: c0000000000c8ad4: .cache_grow+0x64/0x4f0 > > lr: c0000000000c91a8: .cache_alloc_refill+0x248/0x2cc > > sp: c0000000fffb7990 > > msr: 8000000000021032 > > current = 0xc0000000fffab800 > > paca = 0xc00000000047e780 > > pid = 1, comm = swapper > > kernel BUG in cache_grow at mm/slab.c:2705! > > enter ? for help > > [c0000000fffb7a60] c0000000000c91a8 .cache_alloc_refill+0x248/0x2cc > > [c0000000fffb7b20] c0000000000c9708 .kmem_cache_alloc_node+0xd0/0x10c > > [c0000000fffb7bc0] c0000000000b69cc .__get_vm_area_node+0xcc/0x230 > > [c0000000fffb7c70] c0000000000b7640 .__vmalloc_node+0x60/0xc0 > > [c0000000fffb7d10] c0000000001ad4c8 .txInit+0x2a0/0x3a8 > > [c0000000fffb7e20] c00000000044c1ec .init_jfs_fs+0x78/0x27c > > [c0000000fffb7ec0] c0000000000094c0 .init+0x1f4/0x3e4 > > [c0000000fffb7f90] c000000000027270 .kernel_thread+0x4c/0x68 > > I only skimmed through this briefly but it looks like due to > 52fd24ca1db3a741f144bbc229beefe044202cac __get_vm_area_node is passing > GFP_HIGHMEM to kmem_cache_alloc_node which is a no-no. > I haven't been able to reproduce this, although I understand why it happens: vmalloc allocates memory with GFP_KERNEL | __GFP_HIGHMEM and with git5, the same flags are passed down to cache_alloc_refill, causing the BUG. The following patch against 2.6.19-rc3-git5 (also attached as attachment, as this mailer may mess up inline copying) should fix it. Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with ~(__GFP_HIGHMEM | __GFP_ZERO). IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this problem. Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com) diff -Naur linux-2.6.19-rc3-git5.orig/mm/vmalloc.c linux-2.6.19-rc3-git5/mm/vmalloc.c --- linux-2.6.19-rc3-git5.orig/mm/vmalloc.c 2006-10-29 07:26:34.000000000 -0500 +++ linux-2.6.19-rc3-git5/mm/vmalloc.c 2006-10-29 07:28:12.000000000 -0500 @@ -182,7 +182,7 @@ addr = ALIGN(start, align); size = PAGE_ALIGN(size); - area = kmalloc_node(sizeof(*area), gfp_mask, node); + area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); if (unlikely(!area)) return NULL; ____________________________________________________________________________________ Access over 1 million songs - Yahoo! Music Unlimited (http://music.yahoo.com/unlimited) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 16165293-__get_vm_area_node-should-mask-off-gfp-highmem.patch --] [-- Type: text/x-diff; name="__get_vm_area_node-should-mask-off-gfp-highmem.patch", Size: 486 bytes --] diff -Naur linux-2.6.19-rc3-git5.orig/mm/vmalloc.c linux-2.6.19-rc3-git5/mm/vmalloc.c --- linux-2.6.19-rc3-git5.orig/mm/vmalloc.c 2006-10-29 07:26:34.000000000 -0500 +++ linux-2.6.19-rc3-git5/mm/vmalloc.c 2006-10-29 07:28:12.000000000 -0500 @@ -182,7 +182,7 @@ addr = ALIGN(start, align); size = PAGE_ALIGN(size); - area = kmalloc_node(sizeof(*area), gfp_mask, node); + area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); if (unlikely(!area)) return NULL; ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 12:46 ` Giridhar Pemmasani @ 2006-10-29 15:21 ` Martin J. Bligh 2006-10-29 15:53 ` Giridhar Pemmasani 0 siblings, 1 reply; 14+ messages in thread From: Martin J. Bligh @ 2006-10-29 15:21 UTC (permalink / raw) To: Giridhar Pemmasani Cc: Pekka Enberg, Linux Kernel Mailing List, linux-mm, Andy Whitcroft, Linus Torvalds, Andrew Morton >> I only skimmed through this briefly but it looks like due to >> 52fd24ca1db3a741f144bbc229beefe044202cac __get_vm_area_node is passing >> GFP_HIGHMEM to kmem_cache_alloc_node which is a no-no. > > I haven't been able to reproduce this, although I understand why it happens: > vmalloc allocates memory with > > GFP_KERNEL | __GFP_HIGHMEM > > and with git5, the same flags are passed down to cache_alloc_refill, causing > the BUG. The following patch against 2.6.19-rc3-git5 (also attached as > attachment, as this mailer may mess up inline copying) should fix it. Thanks for the patch ... but more worrying is how this got broken. Wasn't the point of having the -mm tree that patches like this went through it for testing, and we avoid breaking mainline? especially this late in the -rc cycle. M. -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 15:21 ` Martin J. Bligh @ 2006-10-29 15:53 ` Giridhar Pemmasani 0 siblings, 0 replies; 14+ messages in thread From: Giridhar Pemmasani @ 2006-10-29 15:53 UTC (permalink / raw) To: Martin J. Bligh Cc: Pekka Enberg, Linux Kernel Mailing List, linux-mm, Andy Whitcroft, Linus Torvalds, Andrew Morton --- "Martin J. Bligh" <mbligh@google.com> wrote: > Thanks for the patch ... but more worrying is how this got broken. > Wasn't the point of having the -mm tree that patches like this went > through it for testing, and we avoid breaking mainline? especially > this late in the -rc cycle. I don't know how it got into Linus's tree, but the breakage was due to my earlier patch - sorry. Giri ____________________________________________________________________________________ Get your email and see which of your friends are online - Right on the New Yahoo.com (http://www.yahoo.com/preview) -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 5:57 Slab panic on 2.6.19-rc3-git5 (-git4 was OK) Martin J. Bligh 2006-10-29 6:58 ` Pekka Enberg @ 2006-10-29 7:05 ` Andrew Morton 2006-10-29 9:17 ` Nick Piggin 2006-10-29 17:47 ` Andy Whitcroft 1 sibling, 2 replies; 14+ messages in thread From: Andrew Morton @ 2006-10-29 7:05 UTC (permalink / raw) To: Martin J. Bligh Cc: Linux Kernel Mailing List, linux-mm, Andy Whitcroft, Linus Torvalds On Sat, 28 Oct 2006 22:57:48 -0700 "Martin J. Bligh" <mbligh@google.com> wrote: > -git4 was fine. -git5 is broken (on PPC64 blade) > > As -rc2-mm2 seemed fine on this box, I'm guessing it's something > that didn't go via Andrew ;-( Looks like it might be something > JFS or slab specific. Bigger PPC64 box with different config > was OK though. > > Full log is here: http://test.kernel.org/abat/59046/debug/console.log > Good -git4 run: http://test.kernel.org/abat/58997/debug/console.log > > kernel BUG in cache_grow at mm/slab.c:2705! This? --- a/mm/vmalloc.c~__vmalloc_area_node-fix +++ a/mm/vmalloc.c @@ -428,7 +428,8 @@ void *__vmalloc_area_node(struct vm_stru area->nr_pages = nr_pages; /* Please note that the recursion is strictly bounded. */ if (array_size > PAGE_SIZE) { - pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); + pages = __vmalloc_node(array_size, gfp_mask & ~__GFP_HIGHMEM, + PAGE_KERNEL, node); area->flags |= VM_VPAGES; } else { pages = kmalloc_node(array_size, _ -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 7:05 ` Andrew Morton @ 2006-10-29 9:17 ` Nick Piggin 2006-10-29 20:53 ` Giridhar Pemmasani 2006-10-29 17:47 ` Andy Whitcroft 1 sibling, 1 reply; 14+ messages in thread From: Nick Piggin @ 2006-10-29 9:17 UTC (permalink / raw) To: Andrew Morton Cc: Martin J. Bligh, Linux Kernel Mailing List, linux-mm, Andy Whitcroft, Linus Torvalds Andrew Morton wrote: > On Sat, 28 Oct 2006 22:57:48 -0700 > "Martin J. Bligh" <mbligh@google.com> wrote: > > >>-git4 was fine. -git5 is broken (on PPC64 blade) >> >>As -rc2-mm2 seemed fine on this box, I'm guessing it's something >>that didn't go via Andrew ;-( Looks like it might be something >>JFS or slab specific. Bigger PPC64 box with different config >>was OK though. >> >>Full log is here: http://test.kernel.org/abat/59046/debug/console.log >>Good -git4 run: http://test.kernel.org/abat/58997/debug/console.log >> >>kernel BUG in cache_grow at mm/slab.c:2705! > > > This? > > --- a/mm/vmalloc.c~__vmalloc_area_node-fix > +++ a/mm/vmalloc.c > @@ -428,7 +428,8 @@ void *__vmalloc_area_node(struct vm_stru > area->nr_pages = nr_pages; > /* Please note that the recursion is strictly bounded. */ > if (array_size > PAGE_SIZE) { > - pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); > + pages = __vmalloc_node(array_size, gfp_mask & ~__GFP_HIGHMEM, > + PAGE_KERNEL, node); > area->flags |= VM_VPAGES; > } else { > pages = kmalloc_node(array_size, Don't you actually *want* the page array to be allocated from highmem? So the gfp mask here should be just for whether we're allowed to sleep / reclaim (ie gfp_mask & ~(__GFP_DMA|__GFP_DMA32) | (__GFP_HIGHMEM))? Slab allocations should be (gfp_mask & ~(__GFP_DMA|__GFP_DMA32|__GFP_HIGHMEM)), which you could mask in __get_vm_area_node -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 9:17 ` Nick Piggin @ 2006-10-29 20:53 ` Giridhar Pemmasani 0 siblings, 0 replies; 14+ messages in thread From: Giridhar Pemmasani @ 2006-10-29 20:53 UTC (permalink / raw) To: linux-mm; +Cc: linux-kernel Nick Piggin wrote: > Andrew Morton wrote: >> --- a/mm/vmalloc.c~__vmalloc_area_node-fix >> +++ a/mm/vmalloc.c >> @@ -428,7 +428,8 @@ void *__vmalloc_area_node(struct vm_stru >> area->nr_pages = nr_pages; >> /* Please note that the recursion is strictly bounded. */ >> if (array_size > PAGE_SIZE) { >> - pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); >> + pages = __vmalloc_node(array_size, gfp_mask & ~__GFP_HIGHMEM, >> + PAGE_KERNEL, node); >> area->flags |= VM_VPAGES; >> } else { >> pages = kmalloc_node(array_size, > > Don't you actually *want* the page array to be allocated from highmem? So > the gfp mask here should be just for whether we're allowed to sleep / > reclaim (ie gfp_mask & ~(__GFP_DMA|__GFP_DMA32) | (__GFP_HIGHMEM))? > > Slab allocations should be (gfp_mask & > ~(__GFP_DMA|__GFP_DMA32|__GFP_HIGHMEM)), which you could mask in > __get_vm_area_node > Since gfp_mask there would also have GFP_ZERO, we need to mask off that too. How about my earlier suggestion of masking off flags in __get_vm_area_node with GFP_LEVEL_MASK? Giri PS: I am not sure if this mail gets to all recipients in the original thread - I am not subscribed to lkml and I haven't found a way to reply to all people and the group. -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 7:05 ` Andrew Morton 2006-10-29 9:17 ` Nick Piggin @ 2006-10-29 17:47 ` Andy Whitcroft 2006-10-29 22:59 ` Martin J. Bligh 1 sibling, 1 reply; 14+ messages in thread From: Andy Whitcroft @ 2006-10-29 17:47 UTC (permalink / raw) To: Andrew Morton Cc: Martin J. Bligh, Linux Kernel Mailing List, linux-mm, Linus Torvalds Andrew Morton wrote: > On Sat, 28 Oct 2006 22:57:48 -0700 > "Martin J. Bligh" <mbligh@google.com> wrote: > >> -git4 was fine. -git5 is broken (on PPC64 blade) >> >> As -rc2-mm2 seemed fine on this box, I'm guessing it's something >> that didn't go via Andrew ;-( Looks like it might be something >> JFS or slab specific. Bigger PPC64 box with different config >> was OK though. >> >> Full log is here: http://test.kernel.org/abat/59046/debug/console.log >> Good -git4 run: http://test.kernel.org/abat/58997/debug/console.log >> >> kernel BUG in cache_grow at mm/slab.c:2705! > > This? > > --- a/mm/vmalloc.c~__vmalloc_area_node-fix > +++ a/mm/vmalloc.c > @@ -428,7 +428,8 @@ void *__vmalloc_area_node(struct vm_stru > area->nr_pages = nr_pages; > /* Please note that the recursion is strictly bounded. */ > if (array_size > PAGE_SIZE) { > - pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); > + pages = __vmalloc_node(array_size, gfp_mask & ~__GFP_HIGHMEM, > + PAGE_KERNEL, node); > area->flags |= VM_VPAGES; > } else { > pages = kmalloc_node(array_size, > _ /me shoves it into the tests... results in a couple of hours. -apw -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 17:47 ` Andy Whitcroft @ 2006-10-29 22:59 ` Martin J. Bligh 2006-10-30 1:19 ` Linus Torvalds 0 siblings, 1 reply; 14+ messages in thread From: Martin J. Bligh @ 2006-10-29 22:59 UTC (permalink / raw) To: Andy Whitcroft Cc: Andrew Morton, Martin J. Bligh, Linux Kernel Mailing List, linux-mm, Linus Torvalds >>> kernel BUG in cache_grow at mm/slab.c:2705! >> This? >> >> --- a/mm/vmalloc.c~__vmalloc_area_node-fix >> +++ a/mm/vmalloc.c >> @@ -428,7 +428,8 @@ void *__vmalloc_area_node(struct vm_stru >> area->nr_pages = nr_pages; >> /* Please note that the recursion is strictly bounded. */ >> if (array_size > PAGE_SIZE) { >> - pages = __vmalloc_node(array_size, gfp_mask, PAGE_KERNEL, node); >> + pages = __vmalloc_node(array_size, gfp_mask & ~__GFP_HIGHMEM, >> + PAGE_KERNEL, node); >> area->flags |= VM_VPAGES; >> } else { >> pages = kmalloc_node(array_size, >> _ > > /me shoves it into the tests... results in a couple of hours. Seems like that doesn't fix it, I'm afraid. M. -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-29 22:59 ` Martin J. Bligh @ 2006-10-30 1:19 ` Linus Torvalds 2006-10-30 9:53 ` Andy Whitcroft 2006-10-30 15:35 ` Andy Whitcroft 0 siblings, 2 replies; 14+ messages in thread From: Linus Torvalds @ 2006-10-30 1:19 UTC (permalink / raw) To: Martin J. Bligh Cc: Andy Whitcroft, Andrew Morton, Martin J. Bligh, Linux Kernel Mailing List, linux-mm On Sun, 29 Oct 2006, Martin J. Bligh wrote: > > Seems like that doesn't fix it, I'm afraid. Does the one in the current -git tree? It's commit 5211e6e6c671f0d4b1e1a1023384d20227d8ee65, as below.. Linus --- commit 5211e6e6c671f0d4b1e1a1023384d20227d8ee65 Author: Giridhar Pemmasani <pgiri@yahoo.com> Date: Sun Oct 29 04:46:55 2006 -0800 [PATCH] Fix GFP_HIGHMEM slab panic As reported by Martin J. Bligh <mbligh@google.com>, we let through some non-slab bits to slab allocation through __get_vm_area_node when doing a vmalloc. I haven't been able to reproduce this, although I understand why it happens: vmalloc allocates memory with GFP_KERNEL | __GFP_HIGHMEM and commit 52fd24ca1db3a741f144bbc229beefe044202cac resulted in the same flags are passed down to cache_alloc_refill, causing the BUG. The following patch fixes it. Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with ~(__GFP_HIGHMEM | __GFP_ZERO). IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this problem. Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com) Cc: Martin J. Bligh <mbligh@google.com> Cc: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 6d381df..46606c1 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -182,7 +182,7 @@ static struct vm_struct *__get_vm_area_n addr = ALIGN(start, align); size = PAGE_ALIGN(size); - area = kmalloc_node(sizeof(*area), gfp_mask, node); + area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); if (unlikely(!area)) return NULL; -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-30 1:19 ` Linus Torvalds @ 2006-10-30 9:53 ` Andy Whitcroft 2006-10-30 15:35 ` Andy Whitcroft 1 sibling, 0 replies; 14+ messages in thread From: Andy Whitcroft @ 2006-10-30 9:53 UTC (permalink / raw) To: Linus Torvalds Cc: Martin J. Bligh, Andrew Morton, Martin J. Bligh, Linux Kernel Mailing List, linux-mm Linus Torvalds wrote: > > On Sun, 29 Oct 2006, Martin J. Bligh wrote: >> Seems like that doesn't fix it, I'm afraid. > > Does the one in the current -git tree? It's commit > 5211e6e6c671f0d4b1e1a1023384d20227d8ee65, as below.. > > Linus Submitted that commit, results in a couple of hours. -apw > > --- > commit 5211e6e6c671f0d4b1e1a1023384d20227d8ee65 > Author: Giridhar Pemmasani <pgiri@yahoo.com> > Date: Sun Oct 29 04:46:55 2006 -0800 > > [PATCH] Fix GFP_HIGHMEM slab panic > > As reported by Martin J. Bligh <mbligh@google.com>, we let through some > non-slab bits to slab allocation through __get_vm_area_node when doing a > vmalloc. > > I haven't been able to reproduce this, although I understand why it > happens: vmalloc allocates memory with > > GFP_KERNEL | __GFP_HIGHMEM > > and commit 52fd24ca1db3a741f144bbc229beefe044202cac resulted in the same > flags are passed down to cache_alloc_refill, causing the BUG. The > following patch fixes it. > > Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with > GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with > > ~(__GFP_HIGHMEM | __GFP_ZERO). > > IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this > problem. > > Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com) > Cc: Martin J. Bligh <mbligh@google.com> > Cc: Andrew Morton <akpm@osdl.org> > Signed-off-by: Linus Torvalds <torvalds@osdl.org> > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 6d381df..46606c1 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -182,7 +182,7 @@ static struct vm_struct *__get_vm_area_n > addr = ALIGN(start, align); > size = PAGE_ALIGN(size); > > - area = kmalloc_node(sizeof(*area), gfp_mask, node); > + area = kmalloc_node(sizeof(*area), gfp_mask & GFP_LEVEL_MASK, node); > if (unlikely(!area)) > return NULL; > -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-30 1:19 ` Linus Torvalds 2006-10-30 9:53 ` Andy Whitcroft @ 2006-10-30 15:35 ` Andy Whitcroft 2006-10-30 15:47 ` Pekka Enberg 1 sibling, 1 reply; 14+ messages in thread From: Andy Whitcroft @ 2006-10-30 15:35 UTC (permalink / raw) To: Linus Torvalds Cc: Martin J. Bligh, Andrew Morton, Martin J. Bligh, Linux Kernel Mailing List, linux-mm Linus Torvalds wrote: > > On Sun, 29 Oct 2006, Martin J. Bligh wrote: >> Seems like that doesn't fix it, I'm afraid. > > Does the one in the current -git tree? It's commit > 5211e6e6c671f0d4b1e1a1023384d20227d8ee65, as below.. > > Linus Test results are back on the version of the slab panic fix which Linus' has committed in his tree. This change on top of 2.6.19-rc3-git5 is good. 2.6.19-rc3-git6 is also showing good on this machine. -apw -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Re: Slab panic on 2.6.19-rc3-git5 (-git4 was OK) 2006-10-30 15:35 ` Andy Whitcroft @ 2006-10-30 15:47 ` Pekka Enberg 0 siblings, 0 replies; 14+ messages in thread From: Pekka Enberg @ 2006-10-30 15:47 UTC (permalink / raw) To: Andy Whitcroft Cc: Linus Torvalds, Martin J. Bligh, Andrew Morton, Martin J. Bligh, Linux Kernel Mailing List, linux-mm On 10/30/06, Andy Whitcroft <apw@shadowen.org> wrote: > Test results are back on the version of the slab panic fix which Linus' > has committed in his tree. This change on top of 2.6.19-rc3-git5 is > good. 2.6.19-rc3-git6 is also showing good on this machine. FWIW, the patch looks correct to me also. Pekka -- 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> ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2006-10-30 15:47 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2006-10-29 5:57 Slab panic on 2.6.19-rc3-git5 (-git4 was OK) Martin J. Bligh 2006-10-29 6:58 ` Pekka Enberg 2006-10-29 12:46 ` Giridhar Pemmasani 2006-10-29 15:21 ` Martin J. Bligh 2006-10-29 15:53 ` Giridhar Pemmasani 2006-10-29 7:05 ` Andrew Morton 2006-10-29 9:17 ` Nick Piggin 2006-10-29 20:53 ` Giridhar Pemmasani 2006-10-29 17:47 ` Andy Whitcroft 2006-10-29 22:59 ` Martin J. Bligh 2006-10-30 1:19 ` Linus Torvalds 2006-10-30 9:53 ` Andy Whitcroft 2006-10-30 15:35 ` Andy Whitcroft 2006-10-30 15:47 ` Pekka Enberg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox