#220524: Only 86MB of RAM shown available on PS3 in Hardy

Dan Munckton lists at munckfish.net
Sat Apr 26 00:30:22 UTC 2008


Hi

I am currently investigating the following kernel issue affecting the
PS3:

  https://bugs.launchpad.net/ubuntu-ps3-port/+bug/220524

It appears something in the memory management systems in the
2.6.24-16-powerpc64-smp kernel on PS3 are messed up which results in
only ~86MB of RAM being available to the system.

So far I have found that running hardy using the older gutsy 2.6.22
'cell' flavour kernel the problem doesn't appear.

Similarly running using a custom build of our 2.6.24 kernel using
a .config generated by "make ps3_defconfig" also resolves the problem.

So it does seem that the problem could be solved by a simple config
change if we can find out which option affects it.

I note in the dmesg output from the failing kernel there is a backtrace:

swapper: page allocation failure. order:12, mode:0x80d0
Call Trace:
[c00000000700f770] [c0000000000102f4] .show_stack+0x54/0x1f0
(unreliable)
[c00000000700f820] [c0000000000eeeb4] .__alloc_pages+0x3c4/0x430
[c00000000700f920] [c000000000115e00] .vmemmap_alloc_block+0x80/0x120
[c00000000700f9b0] [c000000000035578] .vmemmap_populate+0xe8/0x130
[c00000000700fa70] [c000000000115cd8] .sparse_mem_map_populate+0x38/0x60
[c00000000700fb00] [c000000000115adc] .sparse_add_one_section+0x9c/0x1e0
[c00000000700fbb0] [c000000000123850] .__add_pages+0x130/0x1f0
[c00000000700fc70] [c000000000034e78] .arch_add_memory+0x58/0x80
[c00000000700fd10] [c0000000001234e8] .add_memory+0x158/0x2e0
[c00000000700fe00] [c00000000058c918] .ps3_mm_add_memory+0x98/0xe0
[c00000000700fe90] [c000000000568d08] .kernel_init+0x208/0x460
[c00000000700ff90] [c00000000002d190] .kernel_thread+0x4c/0x68
Mem-info:
Node 0 DMA per-cpu:
CPU    0: Hot: hi:   42, btch:   7 usd:   0   Cold: hi:   14, btch:   3
usd:   0
CPU    1: Hot: hi:   42, btch:   7 usd:   0   Cold: hi:   14, btch:   3
usd:   0
Active:0 inactive:0 dirty:0 writeback:0 unstable:0
 free:19712 slab:81 mapped:0 pagetables:0 bounce:0
Node 0 DMA free:78848kB min:0kB low:0kB high:0kB active:0kB inactive:0kB
present:129280kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0
Node 0 DMA: 4*4kB 6*8kB 4*16kB 4*32kB 6*64kB 3*128kB 4*256kB 6*512kB
6*1024kB 7*2048kB 7*4096kB 3*8192kB 0*16384kB = 78848kB
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap  = 0kB
Total swap = 0kB
Free swap:            0kB
32768 pages of RAM
12876 reserved pages
0 pages shared
0 pages swap cached

I'm not sure if this is the root cause (as there are other problems
reported in the dmesg output) but it looks promising.

I have tracked down a similar trace on the lkml [0] which shows a
problem relating to SPARSEMEM_VMEMMAP on PS3/Cell. So I compared
the .config for both the failing and working builds but I found the
config options relating to SPARSEMEM_VMEMMAP were the same.

Can anyone see what the problem is? Is there anything obvious in the
logs/config?

I'm munckfish on IRC if anyone wants to discuss.

Cheers

Dan Munckton


[0] http://lkml.org/lkml/2007/12/2/219





More information about the kernel-team mailing list