ARM MALI: use standard GFP_FLAGS for allocations to prevent failures
authorMandeep Singh Baines <msb@chromium.org>
Wed, 8 Aug 2012 21:50:31 +0000 (14:50 -0700)
committerGerrit <chrome-bot@google.com>
Thu, 9 Aug 2012 21:38:20 +0000 (14:38 -0700)
commit3dc41fbac2f0686b2c9c491cfa3211f7883b708d
tree99423f8a7a137d0570457bec7b1ccd5eed47ad9e
parent4fbf1ef5ea5913b03adbf4aa4ee4f658b21b6cdd
ARM MALI: use standard GFP_FLAGS for allocations to prevent failures

We would prefer if mali allocations did not fail. When mali allocations
fail, we get random failures in gl calls which are really HARD to debug
since the stack trace and failure mode in chrome is always different. So
multiple bugs get opened.

We'd much prefer to OOM when running out of memory. We get a nice stack
trace and detailed state information for the vm system. We also know
immediately that there is an out of memory issue.

The previous GFP_FLAGS are available via a Kconfig option.

BUG=chrome-os-partner:12316
TEST=Verified that bug 12316 now causes an OOM

[  518.884239] chrome invoked oom-killer: gfp_mask=0xd2, order=0, oom_adj=3, oom_
score_adj=200
[  518.884269] [<80015f54>] (unwind_backtrace+0x0/0x128) from [<804f09d4>] (dump_
stack+0x20/0x24)
[  518.884287] [<804f09d4>] (dump_stack+0x20/0x24) from [<800b51bc>] (dump_header
.isra.10+0x7c/0x174)
[  518.884301] [<800b51bc>] (dump_header.isra.10+0x7c/0x174) from [<800b53f8>] (o
om_kill_process.part.13.constprop.14+0x4c/0x20c)
[  518.884314] [<800b53f8>] (oom_kill_process.part.13.constprop.14+0x4c/0x20c) fr
om [<800b5a08>] (out_of_memory+0x2dc/0x39c)
[  518.884328] [<800b5a08>] (out_of_memory+0x2dc/0x39c) from [<800b89f0>] (__allo
c_pages_nodemask+0x524/0x66c)
[  518.884343] [<800b89f0>] (__alloc_pages_nodemask+0x524/0x66c) from [<8029bfd4>
] (kbase_phy_pages_alloc+0x80/0x33c)
[  518.884356] [<8029bfd4>] (kbase_phy_pages_alloc+0x80/0x33c) from [<8029c590>]
(kbase_alloc_phy_pages_helper+0x108/0x230)
[  518.884370] [<8029c590>] (kbase_alloc_phy_pages_helper+0x108/0x230) from [<802
9d000>] (kbase_alloc_phy_pages+0x58/0x78)
[  518.884382] [<8029d000>] (kbase_alloc_phy_pages+0x58/0x78) from [<8029d1d8>] (
kbase_tmem_alloc+0x140/0x1b8)
[  518.884398] [<8029d1d8>] (kbase_tmem_alloc+0x140/0x1b8) from [<802aba80>] (kba
se_dispatch+0xbc/0x3e8)
[  518.884412] [<802aba80>] (kbase_dispatch+0xbc/0x3e8) from [<802a91bc>] (ukk_di
spatch+0x44/0x84)
[  518.884425] [<802a91bc>] (ukk_dispatch+0x44/0x84) from [<802aa880>] (kbase_ioc
tl+0xa8/0x10c)
[  518.884440] [<802aa880>] (kbase_ioctl+0xa8/0x10c) from [<800fbf2c>] (do_vfs_io
ctl+0x4f4/0x568)
[  518.884451] [<800fbf2c>] (do_vfs_ioctl+0x4f4/0x568) from [<800fc000>] (sys_ioc
tl+0x60/0x84)
[  518.884464] [<800fc000>] (sys_ioctl+0x60/0x84) from [<8000e7c0>] (ret_fast_sys
call+0x0/0x30)

Change-Id: If670941123ca8151219a6f4751af3bf3d87f77e2
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29662
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
drivers/gpu/arm/t6xx/kbase/Kconfig
drivers/gpu/arm/t6xx/kbase/osk/src/linux/include/osk/mali_osk_arch_low_level_mem.h