linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: David Rientjes <rientjes@google.com>
Cc: balbir@linux.vnet.ibm.com,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"menage@google.com" <menage@google.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [discuss][memcg] oom-kill extension
Date: Wed, 29 Oct 2008 14:28:58 +0900	[thread overview]
Message-ID: <20081029142858.2db54e92.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0810282206260.10159@chino.kir.corp.google.com>

On Tue, 28 Oct 2008 22:13:03 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:
> 
> There was a patchset from February that added /dev/mem_notify to warn 
> userspace of low or out of memory conditions:
> 
> 	http://marc.info/?l=linux-kernel&m=120257050719077
> 	http://marc.info/?l=linux-kernel&m=120257050719087
> 	http://marc.info/?l=linux-kernel&m=120257062719234
> 	http://marc.info/?l=linux-kernel&m=120257071219327
> 	http://marc.info/?l=linux-kernel&m=120257071319334
> 	http://marc.info/?l=linux-kernel&m=120257080919488
> 	http://marc.info/?l=linux-kernel&m=120257081019497
> 	http://marc.info/?l=linux-kernel&m=120257096219705
> 	http://marc.info/?l=linux-kernel&m=120257096319717
> 
> Perhaps this idea can simply be reworked for the memory controller or 
> standalone cgroup?
> 
I know and like that. The concept of mem_notify is notifing shortage of memory
by watching page reclaimation.
But the situation/usage/purpose is a bit different from oom-killer.
(oom-kill is the final stage to recover memory...)

To implement mem_notify in memcg's context, my idea is
  - support followings.
    => account swap (now going on)
    => show usage of swap
    => "reduce memory usage" interface (to decrease noise from usage of file cache)

In usual systems, we watche"amount of swap".
In swapless systems, watches the amount of anonymous/locked memory under memcg.
Or "measure how much time we'll take to reduce memory usage to some level"

maybe it's interresting that we can add multi-purpose notifier to memcg.
for example, 
  - triggered when anonymous memory is over 95% of limits
  - triggered when swap occurs.

(But can be done by user-land daemon...Hmm?)

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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-10-29  5:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  2:38 KAMEZAWA Hiroyuki
2008-10-29  4:08 ` Balbir Singh
2008-10-29  5:00   ` KAMEZAWA Hiroyuki
2008-10-29  5:13     ` David Rientjes
2008-10-29  5:28       ` KAMEZAWA Hiroyuki [this message]
2008-10-29  6:55       ` KOSAKI Motohiro
2008-10-29  5:35 ` Paul Menage
2008-10-29  5:45   ` KAMEZAWA Hiroyuki
2008-10-29  5:49     ` Paul Menage

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081029142858.2db54e92.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=menage@google.com \
    --cc=mtosatti@redhat.com \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox