How is the memory set in android kernel for different platform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How is the memory set in android kernel for different platform

1,195 Views
asmaa
Contributor V

I am downloading android kernel on iMX6Q through Mfgtool. while doing it I got following error.

UTP: sending Success to kernel for command $ mkfs.ext4 -F -E nodiscard -b 4096 -m 0 -O ^flex_bg,^uninit_bg /dev/mmcblk1p`cat /tmp/partIdx`.
utp_poll: pass returned.
UTP: received command '$ mount -o remount,size=1024M rootfs /'
UTP: executing "mount -o remount,size=1024M rootfs /"
UTP: sending Success to kernel for command $ mount -o remount,size=1024M rootfs /.
utp_poll: pass returned.
UTP: received command 'send'
UTP: sending Success to kernel for command send.
random: crng init done
uuc invoked oom-killer: gfp_mask=0x24200ca(GFP_HIGHUSER_MOVABLE), nodemask=0, order=0, oom_score_adj=0

CPU: 0 PID: 102 Comm: uuc Not tainted 4.9.11+ #1
Hardware name: Freescale i.MX6Q (Device Tree)
[<8010ed50>] (unwind_backtrace) from [<8010b274>] (show_stack+0x10/0x14)
[<8010b274>] (show_stack) from [<803aea6c>] (dump_stack+0x80/0x9c)
[<803aea6c>] (dump_stack) from [<801feb98>] (dump_header.constprop.4+0x64/0x1a0)
[<801feb98>] (dump_header.constprop.4) from [<801bf2cc>] (oom_kill_process+0x2d0/0x4b4)
[<801bf2cc>] (oom_kill_process) from [<801bf784>] (out_of_memory+0xd8/0x41c)
[<801bf784>] (out_of_memory) from [<801c3d4c>] (__alloc_pages_nodemask+0xb5c/0xbb8)
[<801c3d4c>] (__alloc_pages_nodemask) from [<801d251c>] (shmem_getpage_gfp.constprop.7+0x504/0xa00)
[<801d251c>] (shmem_getpage_gfp.constprop.7) from [<801bb354>] (generic_perform_write+0xb8/0x1a0)
[<801bb354>] (generic_perform_write) from [<801bcb18>] (__generic_file_write_iter+0x100/0x1f0)
[<801bcb18>] (__generic_file_write_iter) from [<801bccfc>] (generic_file_write_iter+0xf4/0x208)
[<801bccfc>] (generic_file_write_iter) from [<80201140>] (__vfs_write+0xbc/0x114)
[<80201140>] (__vfs_write) from [<80201e98>] (vfs_write+0xa0/0x168)
[<80201e98>] (vfs_write) from [<80202bec>] (SyS_write+0x3c/0x90)
[<80202bec>] (SyS_write) from [<801076c0>] (ret_fast_syscall+0x0/0x3c)
Mem-Info:
active_anon:2018 inactive_anon:114204 isolated_anon:0
active_file:0 inactive_file:0 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
slab_reclaimable:471 slab_unreclaimable:989
mapped:556 shmem:116157 pagetables:11 bounce:0
free:408 free_pcp:41 free_cma:0
Node 0 active_anon:8072kB inactive_anon:456816kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2224kB dirty:0kB writeback:0kB shmem:464628kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? yes
Normal free:1632kB min:1652kB low:2064kB high:2476kB active_anon:8072kB inactive_anon:456816kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:524288kB managed:507900kB mlocked:0kB slab_reclaimable:1884kB slab_unreclaimable:3956kB kernel_stack:544kB pagetables:44kB bounce:0kB free_pcp:164kB local_pcp:164kB free_cma:0kB
lowmem_reserve[]: 0 0 0
Normal: 2*4kB (U) 3*8kB (UM) 2*16kB (U) 33*32kB (UM) 8*64kB (U) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 1632kB
116157 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
131072 pages RAM
0 pages HighMem/MovableOnly
4097 pages reserved
81920 pages cma reserved
[ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
[ 102] 0 102 467 320 6 0 0 0 uuc
Out of memory: Kill process 102 (uuc) score 2 or sacrifice child
Killed process 102 (uuc) total-vm:1868kB, anon-rss:132kB, file-rss:4kB, shmem-rss:1144kB
oom_reaper: reaped process 102 (uuc), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
/linuxrc: line 44: 102 Killed uuc
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00008900

---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00008900

file-storage invoked oom-killer: gfp_mask=0x24002c2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN), nodemask=0, order=0, oom_score_adj=0
CPU: 0 PID: 82 Comm: file-storage Not tainted 4.9.11+ #1
Hardware name: Freescale i.MX6 UltraLite (Device Tree)
[<8010ed50>] (unwind_backtrace) from [<8010b274>] (show_stack+0x10/0x14)
[<8010b274>] (show_stack) from [<803aea6c>] (dump_stack+0x80/0x9c)
[<803aea6c>] (dump_stack) from [<801feb98>] (dump_header.constprop.4+0x64/0x1a0)
[<801feb98>] (dump_header.constprop.4) from [<801bfa3c>] (out_of_memory+0x390/0x41c)
[<801bfa3c>] (out_of_memory) from [<801c3d4c>] (__alloc_pages_nodemask+0xb5c/0xbb8)
[<801c3d4c>] (__alloc_pages_nodemask) from [<801ef38c>] (__vmalloc_node_range+0xec/0x20c)
[<801ef38c>] (__vmalloc_node_range) from [<801ef73c>] (__vmalloc_node.constprop.13+0x40/0x50)
[<801ef73c>] (__vmalloc_node.constprop.13) from [<801ef7d8>] (vmalloc+0x24/0x34)
[<801ef7d8>] (vmalloc) from [<8058eda4>] (utp_user_data_alloc+0x14/0x60)
[<8058eda4>] (utp_user_data_alloc) from [<80591410>] (fsg_main_thread+0x608/0x22f8)
[<80591410>] (fsg_main_thread) from [<8014a9b4>] (kthread+0xd0/0xf0)
[<8014a9b4>] (kthread) from [<80107778>] (ret_from_fork+0x14/0x3c)
Mem-Info:
active_anon:1948 inactive_anon:114209 isolated_anon:0
active_file:0 inactive_file:0 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
slab_reclaimable:471 slab_unreclaimable:989
mapped:1 shmem:116157 pagetables:4 bounce:0
free:407 free_pcp:43 free_cma:0
Node 0 active_anon:7792kB inactive_anon:456836kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:4kB dirty:0kB writeback:0kB shmem:464628kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? yes
Normal free:1628kB min:1652kB low:2064kB high:2476kB active_anon:7792kB inactive_anon:456852kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:524288kB managed:507900kB mlocked:0kB slab_reclaimable:1884kB slab_unreclaimable:3952kB kernel_stack:536kB pagetables:4kB bounce:0kB free_pcp:172kB local_pcp:172kB free_cma:0kB
lowmem_reserve[]: 0 0 0
Normal: 21*4kB (M) 9*8kB (UM) 2*16kB (M) 27*32kB (UM) 9*64kB (UM) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 1628kB
116161 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
131072 pages RAM
0 pages HighMem/MovableOnly
4097 pages reserved
81920 pages cma reserved
[ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
Kernel panic - not syncing: Out of memory and no killable processes...

Looking at logs:uuc is invoking oomkiller, dont kniow why?

As I read on the internet following thread:

https://stackoverflow.com/questions/9199731/understanding-the-linux-oom-killers-logs

it is mentioning its related to memory and to fix the problem they have mentioned 

To fix this problem the behavior of the kernel has to be changed, so it will no longer overcommit the memory for application requests.

 Finally I have included those mentioned values into the /etc/sysctl.conf file, so they get automatically applied on start-up:

vm.overcommit_memory = 2

vm.overcommit_ratio = 80

Can I do something like this in IMX6?

Where are the memory configuration for iMX6 like RAM, L1/L2 Data and Instruction cache defined in source code.

and how can I modify to solve my issue?

Labels (1)
1 Reply

1,012 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Can you please tell me the board and Android version that you are using?

Best regards,

Diego.

0 Kudos