Hi All, I am experimenting with one of our uClinux-based no-mmu systems and low memory situations. I found several articles about OOM (on linux-mm.org and LWN), read man 5 proc (from kernel.org to have the latest) and grepped and read through at least part of the Documentation folder in the kernel. But I must be missing something and would appreciate a pointer to what else to read under Documentation or in a white paper / web page / mailing list thread that explains the following to me:
I created a test that would do n mallocs of size m, figured that size 4096 allocs already need two pages via proc/pid/maps but 4092 size allocs just use one page, then did cat /proc/zoneinfo and had my little app just allocate all the free pages in zone Normal. Also I had set /proc/sys/vm/overcommit_memory to 2 and overcommit_ratio to 100. And in my /init script echoed -17 to proc/pid/oom_adj of all running processes. The idea was that I expected to kernel to start failing the mallocs on my usermode code. To my surprise the kernel just panicked: / # memuser -t 0 4092 4900 [ 113.910000] Kernel panic - not syncing: Out of memory and no killable processes... [ 113.910000] I am still a newbie and this must be and age-old topic so I must be missing some old and very basic discussions that possibly predate linux about why a kernel just dies like this. Or I have just overlooked some part of the documentation that would allow me to control at which point user mode allocs should start to fail and return NULL and that is why it panics now (but lowmem_reserve_ratio and min_free_kbytes and not documented on http://www.kernel.org/doc/man-pages/online/pages/man5/proc.5.html ?anymore?). I can see that disabling the OOM killer means taking away the preferred way for the kernel to deal with an OOM situation, and I saw a patch mentioned that does bookkeeping of memory for process groups which might help, but before I start searching for and applying patches I wanted to ask here. RTFM type comments (mentioning a useful M) are highly appreciated! Best Regards, - Rainer _______________________________________________ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev