Skip to content
Snippets Groups Projects
Commit c2fd71ef authored by Xianzhong's avatar Xianzhong Committed by Gianfranco Mariotti
Browse files

LF-4436-1 [#imx-2664] fix gpu memory limit to avoid system oom killer


Chromium v91 introduces more memory consumption to trigger out of memory,
gpu memory limit become ineffective when free ram include more cma pages,

gpu memory limit apply gfp allocator only, need exclude cma pages.
global_zone_page_state interface is introduced in 4.14 kernel.

enable gpu memory limit feature for cma and reserve allocator,
skip gpu memory limit check for contiguous request by design.

[ 1251.328724] Chrome_InProcGp invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[ 1251.337928] CPU: 1 PID: 1160 Comm: Chrome_InProcGp Tainted: G         C        5.10.52-lts-5.10.y+g5788c4507376 #1
[ 1251.348294] Hardware name: NXP i.MX8MNano EVK board (DT)
[ 1251.456834] Mem-Info:
[ 1251.459158] active_anon:447 inactive_anon:121521 isolated_anon:0
[ 1251.459158]  active_file:2218 inactive_file:2748 isolated_file:0
[ 1251.459158]  unevictable:0 dirty:28 writeback:0
[ 1251.459158]  slab_reclaimable:3263 slab_unreclaimable:8837
[ 1251.459158]  mapped:31664 shmem:38593 pagetables:2300 bounce:0
[ 1251.459158]  free:96590 free_pcp:653 free_cma:78619

Signed-off-by: default avatarXianzhong <xianzhong.li@nxp.com>
parent a76a0f9b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment