From: Sachin Sant <hidden> Date: 2009-07-30 12:25:18
Sachin Sant wrote:
next-20090728 worked fine. Last commit that changed
arch/powerpc/mm/hugetlbpage.c was cb7f3f2d92d1b26c13e30e639b6ee4a78e9a3afa
powerpc: Add memory management headers for new 64-bit BookE
I will try reverting that commit and check if that helps.
Hi Ben,
Reverting the above patch helped. The tests ran fine against the
patched kernel. But ofcourse that's not the solution :-)
Here is some data from xmon that might help find the reason for
the failure. This is with today's next.
: ------------[ cut here ]------------
cpu 0x0: Vector: 700 (Program Check) at [c000000038923560]
pc: c0000000000486d4: .free_hugepte_range+0x68/0xa0
lr: c000000000048954: .hugetlb_free_pgd_range+0x248/0x38c
sp: c0000000389237e0
msr: 8000000000029032
current = 0xc00000003b1d7780
paca = 0xc000000001002400
pid = 2839, comm = readback
kernel BUG at /home/linux-2.6.31-rc4/arch/powerpc/include/asm/pgalloc.h:36!
enter ? for help
[c000000038923880] c000000000048954 .hugetlb_free_pgd_range+0x248/0x38c
[c000000038923970] c000000000165a48 .free_pgtables+0xa0/0x154
[c000000038923a30] c000000000167f78 .exit_mmap+0x13c/0x1cc
[c000000038923ae0] c0000000000997ec .mmput+0x68/0x14c
[c000000038923b70] c00000000009f1d4 .exit_mm+0x190/0x1b8
[c000000038923c20] c0000000000a16e8 .do_exit+0x214/0x784
[c000000038923d00] c0000000000a1d1c .do_group_exit+0xc4/0xf8
[c000000038923da0] c0000000000a1d7c .SyS_exit_group+0x2c/0x48
[c000000038923e30] c0000000000085b4 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 000000000fe15038
SP (ffb8e030) is in userspace
0:mon> e
cpu 0x0: Vector: 700 (Program Check) at [c000000038923560]
pc: c0000000000486d4: .free_hugepte_range+0x68/0xa0
lr: c000000000048954: .hugetlb_free_pgd_range+0x248/0x38c
sp: c0000000389237e0
msr: 8000000000029032
current = 0xc00000003b1d7780
paca = 0xc000000001002400
pid = 2839, comm = readback
kernel BUG at /home/linux-2.6.31-rc4/arch/powerpc/include/asm/pgalloc.h:36!
0:mon> r
R00 = 0000000000000001 R16 = 0000000000000000
R01 = c0000000389237e0 R17 = 0000000000000001
R02 = c000000000f165a8 R18 = 000000003fffffff
R03 = c0000000014504d0 R19 = 0000000000000000
R04 = c000000039390001 R20 = 0000000000000000
R05 = 0000000000000007 R21 = 0000010000000000
R06 = 0000000000000000 R22 = 0000000040000000
R07 = 0000000040000000 R23 = c0000000014504d0
R08 = c00000003d708188 R24 = 000000003fffffff
R09 = c00000003eb40000 R25 = 0000000000000007
R10 = c00000003d708188 R26 = c00000003ebd41b8
R11 = 0000000000000018 R27 = c0000000014504d0
R12 = 0000000040000448 R28 = c00000003eb40018
R13 = c000000001002400 R29 = 0000000000000008
R14 = 00000000ffffffff R30 = 0000000040000000
R15 = 00000000ffffffff R31 = c0000000389237e0
pc = c0000000000486d4 .free_hugepte_range+0x68/0xa0
lr = c000000000048954 .hugetlb_free_pgd_range+0x248/0x38c
msr = 8000000000029032 cr = 20042444
ctr = 800000000000b6f4 xer = 0000000000000001 trap = 700
0:mon>
Line 36 of arch/powerpc/include/asm/pgalloc.h corresponds to
BUG_ON(cachenum > PGF_CACHENUM_MASK);
May be something to do with number of elements in huge_pgtable_cache_name ??
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2009-07-30 12:30:49
On Thu, 2009-07-30 at 17:55 +0530, Sachin Sant wrote:
Sachin Sant wrote:
quoted
next-20090728 worked fine. Last commit that changed
arch/powerpc/mm/hugetlbpage.c was
cb7f3f2d92d1b26c13e30e639b6ee4a78e9a3afa
powerpc: Add memory management headers for new 64-bit BookE
I will try reverting that commit and check if that helps.
Hi Ben,
Reverting the above patch helped. The tests ran fine against the
patched kernel. But ofcourse that's not the solution :-)
Here is some data from xmon that might help find the reason for
the failure. This is with today's next.
Thanks. I'll have a look next week. I think when I changed the indices
I may have forgotten to update something.
Cheers,
Ben.
quoted hunk
: ------------[ cut here ]------------
cpu 0x0: Vector: 700 (Program Check) at [c000000038923560]
pc: c0000000000486d4: .free_hugepte_range+0x68/0xa0
lr: c000000000048954: .hugetlb_free_pgd_range+0x248/0x38c
sp: c0000000389237e0
msr: 8000000000029032
current = 0xc00000003b1d7780
paca = 0xc000000001002400
pid = 2839, comm = readback
kernel BUG at /home/linux-2.6.31-rc4/arch/powerpc/include/asm/pgalloc.h:36!
enter ? for help
[c000000038923880] c000000000048954 .hugetlb_free_pgd_range+0x248/0x38c
[c000000038923970] c000000000165a48 .free_pgtables+0xa0/0x154
[c000000038923a30] c000000000167f78 .exit_mmap+0x13c/0x1cc
[c000000038923ae0] c0000000000997ec .mmput+0x68/0x14c
[c000000038923b70] c00000000009f1d4 .exit_mm+0x190/0x1b8
[c000000038923c20] c0000000000a16e8 .do_exit+0x214/0x784
[c000000038923d00] c0000000000a1d1c .do_group_exit+0xc4/0xf8
[c000000038923da0] c0000000000a1d7c .SyS_exit_group+0x2c/0x48
[c000000038923e30] c0000000000085b4 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 000000000fe15038
SP (ffb8e030) is in userspace
0:mon> e
cpu 0x0: Vector: 700 (Program Check) at [c000000038923560]
pc: c0000000000486d4: .free_hugepte_range+0x68/0xa0
lr: c000000000048954: .hugetlb_free_pgd_range+0x248/0x38c
sp: c0000000389237e0
msr: 8000000000029032
current = 0xc00000003b1d7780
paca = 0xc000000001002400
pid = 2839, comm = readback
kernel BUG at /home/linux-2.6.31-rc4/arch/powerpc/include/asm/pgalloc.h:36!
0:mon> r
R00 = 0000000000000001 R16 = 0000000000000000
R01 = c0000000389237e0 R17 = 0000000000000001
R02 = c000000000f165a8 R18 = 000000003fffffff
R03 = c0000000014504d0 R19 = 0000000000000000
R04 = c000000039390001 R20 = 0000000000000000
R05 = 0000000000000007 R21 = 0000010000000000
R06 = 0000000000000000 R22 = 0000000040000000
R07 = 0000000040000000 R23 = c0000000014504d0
R08 = c00000003d708188 R24 = 000000003fffffff
R09 = c00000003eb40000 R25 = 0000000000000007
R10 = c00000003d708188 R26 = c00000003ebd41b8
R11 = 0000000000000018 R27 = c0000000014504d0
R12 = 0000000040000448 R28 = c00000003eb40018
R13 = c000000001002400 R29 = 0000000000000008
R14 = 00000000ffffffff R30 = 0000000040000000
R15 = 00000000ffffffff R31 = c0000000389237e0
pc = c0000000000486d4 .free_hugepte_range+0x68/0xa0
lr = c000000000048954 .hugetlb_free_pgd_range+0x248/0x38c
msr = 8000000000029032 cr = 20042444
ctr = 800000000000b6f4 xer = 0000000000000001 trap = 700
0:mon>
Line 36 of arch/powerpc/include/asm/pgalloc.h corresponds to
BUG_ON(cachenum > PGF_CACHENUM_MASK);
May be something to do with number of elements in huge_pgtable_cache_name ??
Thanks
-Sachin
From: Sachin Sant <hidden> Date: 2009-08-05 10:43:08
Benjamin Herrenschmidt wrote:
Thanks. I'll have a look next week. I think when I changed the indices
I may have forgotten to update something.
Ben,
I can recreate this issue with today's next.
Let me know if i can help in any way to fix this issue.
Thanks
-Sachin
quoted
: ------------[ cut here ]------------
cpu 0x0: Vector: 700 (Program Check) at [c000000038923560]
pc: c0000000000486d4: .free_hugepte_range+0x68/0xa0
lr: c000000000048954: .hugetlb_free_pgd_range+0x248/0x38c
sp: c0000000389237e0
msr: 8000000000029032
current = 0xc00000003b1d7780
paca = 0xc000000001002400
pid = 2839, comm = readback
kernel BUG at /home/linux-2.6.31-rc4/arch/powerpc/include/asm/pgalloc.h:36!
enter ? for help
[c000000038923880] c000000000048954 .hugetlb_free_pgd_range+0x248/0x38c
[c000000038923970] c000000000165a48 .free_pgtables+0xa0/0x154
[c000000038923a30] c000000000167f78 .exit_mmap+0x13c/0x1cc
[c000000038923ae0] c0000000000997ec .mmput+0x68/0x14c
[c000000038923b70] c00000000009f1d4 .exit_mm+0x190/0x1b8
[c000000038923c20] c0000000000a16e8 .do_exit+0x214/0x784
[c000000038923d00] c0000000000a1d1c .do_group_exit+0xc4/0xf8
[c000000038923da0] c0000000000a1d7c .SyS_exit_group+0x2c/0x48
[c000000038923e30] c0000000000085b4 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 000000000fe15038
SP (ffb8e030) is in userspace
0:mon> e
cpu 0x0: Vector: 700 (Program Check) at [c000000038923560]
pc: c0000000000486d4: .free_hugepte_range+0x68/0xa0
lr: c000000000048954: .hugetlb_free_pgd_range+0x248/0x38c
sp: c0000000389237e0
msr: 8000000000029032
current = 0xc00000003b1d7780
paca = 0xc000000001002400
pid = 2839, comm = readback
kernel BUG at /home/linux-2.6.31-rc4/arch/powerpc/include/asm/pgalloc.h:36!
0:mon> r
R00 = 0000000000000001 R16 = 0000000000000000
R01 = c0000000389237e0 R17 = 0000000000000001
R02 = c000000000f165a8 R18 = 000000003fffffff
R03 = c0000000014504d0 R19 = 0000000000000000
R04 = c000000039390001 R20 = 0000000000000000
R05 = 0000000000000007 R21 = 0000010000000000
R06 = 0000000000000000 R22 = 0000000040000000
R07 = 0000000040000000 R23 = c0000000014504d0
R08 = c00000003d708188 R24 = 000000003fffffff
R09 = c00000003eb40000 R25 = 0000000000000007
R10 = c00000003d708188 R26 = c00000003ebd41b8
R11 = 0000000000000018 R27 = c0000000014504d0
R12 = 0000000040000448 R28 = c00000003eb40018
R13 = c000000001002400 R29 = 0000000000000008
R14 = 00000000ffffffff R30 = 0000000040000000
R15 = 00000000ffffffff R31 = c0000000389237e0
pc = c0000000000486d4 .free_hugepte_range+0x68/0xa0
lr = c000000000048954 .hugetlb_free_pgd_range+0x248/0x38c
msr = 8000000000029032 cr = 20042444
ctr = 800000000000b6f4 xer = 0000000000000001 trap = 700
0:mon>
Line 36 of arch/powerpc/include/asm/pgalloc.h corresponds to
BUG_ON(cachenum > PGF_CACHENUM_MASK);
May be something to do with number of elements in huge_pgtable_cache_name ??
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
From: Sachin Sant <hidden> Date: 2009-08-05 15:33:47
Kumar Gala wrote:
On Jul 29, 2009, at 10:04 AM, Sachin Sant wrote:
quoted
While executing hugetlb tests against today's Next tree on
a Power 6 box came across following OOPS.
out of interest what tests are you running for hugetlb?
The one maintained at : http://libhugetlbfs.ozlabs.org/ which points
to the sourceforge libhugetlbfs project.
Latest release can be downloaded from sourceforge using
http://sourceforge.net/projects/libhugetlbfs/files/
I am using version 2.5
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2009-08-06 03:52:58
On Wed, 2009-08-05 at 16:13 +0530, Sachin Sant wrote:
Benjamin Herrenschmidt wrote:
quoted
Thanks. I'll have a look next week. I think when I changed the indices
I may have forgotten to update something.
Ben,
I can recreate this issue with today's next.
Let me know if i can help in any way to fix this issue.
Does this patch fixes it ?
[PATCH] powerpc/mm: Fix encoding of page table cache numbers
The mask used to encode the page table cache number in the
batch when freeing page tables was too small for the new
possible values of MMU page sizes. This increases it along
with a comment explaining the constraints.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
arch/powerpc/include/asm/pgalloc.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
@@ -28,7 +28,12 @@ typedef struct pgtable_free {unsignedlongval;}pgtable_free_t;-#define PGF_CACHENUM_MASK 0x7+/* This needs to be big enough to allow for MMU_PAGE_COUNT + 2 to be stored+*andsmallenoughtofitinthelowbitsofanynaturallyalignedpage+*tablecacheentry.Arbitrarilysetto0x1f,thatshouldgiveussome+*roomtogrow+*/+#define PGF_CACHENUM_MASK 0x1fstaticinlinepgtable_free_tpgtable_free_cache(void*p,intcachenum,unsignedlongmask)
From: Sachin Sant <hidden> Date: 2009-08-06 04:40:51
Benjamin Herrenschmidt wrote:
Does this patch fixes it ?
[PATCH] powerpc/mm: Fix encoding of page table cache numbers
The mask used to encode the page table cache number in the
batch when freeing page tables was too small for the new
possible values of MMU page sizes. This increases it along
with a comment explaining the constraints.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Yes this patch fixed the issue for me. Thanks Ben.
Tested-by: Sachin Sant <redacted>
Regards
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------