Thread (45 messages) 45 messages, 4 authors, 2011-03-18

Re: [patch] memcg: give current access to memory reserves if it's trying to die

From: KAMEZAWA Hiroyuki <hidden>
Date: 2011-03-18 06:05:00

On Thu, 17 Mar 2011 22:17:58 -0700
Andrew Morton [off-list ref] wrote:
On Fri, 18 Mar 2011 13:35:34 +0900 KAMEZAWA Hiroyuki [off-list ref] wrote:
quoted
On Thu, 17 Mar 2011 16:53:19 -0700
Andrew Morton [off-list ref] wrote:
quoted
Was it deliberate that mem_cgroup_out_of_memory() ignores the oom
notifier callbacks?
I'm not sure for what purpose notifier chain for oom exists.
At a loock, it's for s390/powerpc Collaborative Memory Manager.. ?
commit 8bc719d3cab8414938f9ea6e33b58d8810d18068
Author:     Martin Schwidefsky [off-list ref]
AuthorDate: Mon Sep 25 23:31:20 2006 -0700
Commit:     Linus Torvalds [off-list ref]
CommitDate: Tue Sep 26 08:48:47 2006 -0700

    [PATCH] out of memory notifier
    
    Add a notifer chain to the out of memory killer.  If one of the registered
    callbacks could release some memory, do not kill the process but return and
    retry the allocation that forced the oom killer to run.
    
    The purpose of the notifier is to add a safety net in the presence of
    memory ballooners.  If the resource manager inflated the balloon to a size
    where memory allocations can not be satisfied anymore, it is better to
    deflate the balloon a bit instead of killing processes.
    
    The implementation for the s390 ballooner is included.
quoted
About memcg, notifier to userland already exists and I though I don't
need to call CMM callbacks (for now, there is no user with memcg, I guess.)
Seems to me that the callback should be performed.
Hmm, (for now) memory cgroup just handles user's memory, so any kernel
callback cannot do anything..other than dropping file cache if some
module pins it.
Or, perhaps, migrate it over to use the shrinker stuff, along with
suitable handling of the scanning priority.
Ah, yes. callback at oom is too late, I think.

Thanks,
-Kame


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help