[Cbe-oss-dev] Only 86MB of RAM available running Ubuntu 8.04 powerpc64-smp kernel on PS3

Dan Munckton lists at munckfish.net
Mon May 5 10:50:04 EST 2008


Hi all

Quick intro - I've recently taken it upon myself to do something about
getting Ubuntu Hardy running on the PS3. Unfortunately for most of the
Hardy development cycle there was no one working on the PS3 port
consequently the kernel is a bit broken.

Although I have the motivation I am quite new to kernel work so please
be gentle with me.

Basically I think most of the issues we have can be solved by using the
correct configuration. Building and running a kernel using just the
options from ps3_defconfig makes all issues go away. Where I'm going to
need help is in identifying which options need to be changed and
hopefully understanding why.

The first issue on my list is this: only 86MB of RAM appear to be
available. We're tracking this issue at [0] where I've uploaded all
configs and logs.

There is a backtrace in the dmesg output from the failing kernel which I
think maybe related (attached). It starts with ...

swapper: page allocation failure. order:12, mode:0x80d0

Googling for this message turned up an LKML thread by some of you guys
[1] but I couldn't really extract a solution from it. I checked the
SPARSEMEM_VMEMMAP options in the hardy kernel and they are the same as
for ps3_defconfig.

I've attached my notes showing the options which are different and
option which are only set in ps3_defconfig. I've not analysed options
unique to the hardy kernel yet as there thousands and they are mostly
extra modules and drivers.

There are surprisingly few noteworthy differences. Still, going through
trying each difference and recompiling a kernel each time is a problem
for me because of how little time I can work on this and how slowly the
kernel compiles on the PS3. So I'm really hoping someone here can help
me target my efforts a little better.

So far I tried recompiling with SLAB instead of SLUB but that didn't
have any affect.

Cheers

Dan


[0] https://bugs.launchpad.net/ubuntu-ps3-port/+bug/220524
[1] http://lkml.org/lkml/2007/12/2/219
[2] http://launchpadlibrarian.net/14111105/config-diffs

-------------- next part --------------
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
-------------- next part --------------
******* ONLY IN ps3_defconfig *******
	CONFIG_ARCH_FLATMEM_ENABLE=y    # /!\ not set if NUMA is set, on power NUMA=y on ps3 NUMA=not set, therefore on ps3 this opt=y
	CONFIG_BLK_DEV_BSG=y            # something to do with SCSI
	CONFIG_CC_OPTIMIZE_FOR_SIZE=y   # a compiler option to produce a smaller kernel image
	CONFIG_DEBUG_INFO=y             # add debug symbols to the kernel image
	CONFIG_DEBUG_LIST=y             # extended checks in the linked list walking routines
	CONFIG_DEBUG_MUTEXES=y          # allows mutex semantics violations to be detected and reported
	CONFIG_DEBUG_SPINLOCK=y         # spinlock debugging on SMP
	CONFIG_DEBUG_SPINLOCK_SLEEP=y
	CONFIG_DEBUG_STACKOVERFLOW=y    # will cause messages to be printed if free stack space drops below a certain limit
	CONFIG_DEFAULT_AS=y             # sets the 'Anticipatory' IO Schedular as default for all block devices (see block/Kconfig.iosched)
	CONFIG_ENABLE_MUST_CHECK=y      # build system will warn of unchecked/unused return values
	CONFIG_ENABLE_WARN_DEPRECATED=y # warn of deprecated code
	CONFIG_FAIR_USER_SCHED=y        # will choose userid as the basis for grouping tasks, thus providing equal CPU bandwidth to each user
	CONFIG_FB_LOGO_EXTRA=y          # logo stuff
	CONFIG_FORCED_INLINING=y        # force GCC to inline. may not be necessary in gcc 4.x, which results in smaller kernel
	CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y # make framebuffer console automatically select the primary display device
	CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y # support display rotation in software
	CONFIG_IP_PNP=y                 # enable auto configuration of IP addresses and routing table at boot (for diskless network boot)
	CONFIG_IP_PNP_DHCP=y            # enable this in case the boot ROM on your network card can do dhcp (for diskless network boot)
	CONFIG_IRQSTACKS=y              # make the kernel use separate kernel stacks for handling hard and soft interrupts
	CONFIG_KALLSYMS_EXTRA_PASS=y    # force successful build while waiting for kallsyms to be fixed, should not be on by default
	CONFIG_LOCALVERSION_AUTO=y      # inspect git tags for extra version info
	CONFIG_LOGO=y                   # enable frame buffer bootup logos
	CONFIG_LOGO_LINUX_CLUT224=y
	CONFIG_PREEMPT_NONE=y           # enable traditional Linux preemption model, geared towards throughput. for servers, science etc.
	CONFIG_ROOT_NFS=y               # remote fs mounting for diskless boot
	CONFIG_SLAB=y                   # /!\ use SLAB allocator. SLUB is more efficient and is default. power config uses SLUB not SLAB
	CONFIG_SND_VERBOSE_PROCFS=y     # produce more verbose info in sound procfs. for debugging.
	CONFIG_SYSFS_DEPRECATED=y       # /!\ enable deprecated SYSFS symlinks. shouldn't be needed in a post 2006 kernel
	CONFIG_TUNE_CELL=y              # optimize for Cell Broadband Engine. code will run considerably fast on cell but somewhat slower on other machines needs 
	
******* DIFFERING *******
CONFIG_BLK_DEV_RAM_SIZE             # /!\ The default value is 4096 kilobytes. Only change this if you know what you are doing.
	value: '65536', file: 'config-2.6.24-16-powerpc64-smp'
	value: '65535', file: 'config-2.6.24.3-cell'
CONFIG_DEFAULT_IOSCHED
	value: '"cfq"', file: 'config-2.6.24-16-powerpc64-smp'
	value: '"anticipatory"', file: 'config-2.6.24.3-cell'
CONFIG_DEFAULT_TCP_CONG
	value: '"reno"', file: 'config-2.6.24-16-powerpc64-smp'
	value: '"cubic"', file: 'config-2.6.24.3-cell'
CONFIG_FB_PS3_DEFAULT_SIZE_M
	value: '18', file: 'config-2.6.24-16-powerpc64-smp'
	value: '9', file: 'config-2.6.24.3-cell'
CONFIG_LEGACY_PTY_COUNT
	value: '256', file: 'config-2.6.24-16-powerpc64-smp'
	value: '16', file: 'config-2.6.24.3-cell'
CONFIG_NLS_DEFAULT
	value: '"cp437"', file: 'config-2.6.24-16-powerpc64-smp'
	value: '"iso8859-1"', file: 'config-2.6.24.3-cell'


More information about the cbe-oss-dev mailing list