Regarding memcg control testcase (mem_process.c)
HI Jan,
Now we have run all memcg testcases , they need mainly two things:
1) echo -16 > /proc/$pid/oom_adj
2) and a long sleep ( 30 seconds) so that after OOM , it get killed, normally it takes some time, so After increasing the sleep time, mem_process get killed. Thanks for your support.
------- Original Message -------
Sender : Jan Stancek<[email protected]>
Date : Jul 29, 2015 15:48 (GMT+09:00)
Title : Re: [LTP] Regarding memcg control testcase (mem_process.c)
----- Original Message -----
Quoted 13 lines
From: "Manjeet Pawar"
To: "Jan Stancek" , [email protected]
Cc: "AJEET YADAV" , "PANKAJ MISHRA"
Sent: Wednesday, 29 July, 2015 5:54:55 AM
Subject: Re: Re: [LTP] Regarding memcg control testcase (mem_process.c)Hello Jan,
After doing analysis, I found that When memory hog process (mem_process) tries to mmap double the memory of the cgroup limit which is 4096 . I am getting OOM in that situation and send kill signal to process (which is expected behaviour) . But it could not kill the process and
it sets the process state to uninterrupted sleep state.
Quoted 3 lines
To get this OOM , i need to change
oom_adjvalue of the process '208' from -17 to -16. If i dont do this, I dont get OOM and process always stuck at mmap and try to allocate 8192 Bytes of memory.
That explains it, -17 means OOM is disabled:
#define OOM_DISABLE (-17)
Quoted 10 lines
logs:-
[2-74.5749] Memory cgroup out of memory: Kill process 208 (mem_process) score 147000 or sacrifice child
[2-74.5840] Killed process 208 (mem_process) total-vm:2704kB, anon-rss:80kB, file-rss:484kB
by mmap is -1237753856
Warning: bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.8/FAQ
root 208 39.6 0.0 2704 564 ? D 00:01 0:02mem_process
-m 8192 // D - means uninterrupted sleep
root 215 0.0 0.0 2412 584 ? S 00:01 0:00 grep -r 208
No idea why it's getting stuck though. I'd try with oom_adj == 0. If that makes no difference, /proc//stack might give some additional clues.
Do you see similar behaviour with other OOM testcases?
Regards,
Jan
Quoted 14 lines
I am using 3.10.84 kernel. LTP is of latest version (ltp-full-20150420)
Regards
Manjeet------- Original Message -------
Sender : Jan Stancek
Date : Jul 27, 2015 17:32 (GMT+09:00)
Title : Re: [LTP] Regarding memcg control testcase (mem_process.c)
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list