linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: yamamoto@valinux.co.jp (YAMAMOTO Takashi)
To: kamezawa.hiroyu@jp.fujitsu.com
Cc: linux-mm@kvack.org, containers@lists.osdl.org,
	balbir@linux.vnet.ibm.com, xemul@openvz.org,
	nishimura@mxp.nes.nec.co.jp, menage@google.com
Subject: Re: [RFD][PATCH] memcg: Move Usage at Task Move
Date: Tue, 10 Jun 2008 14:50:32 +0900 (JST)	[thread overview]
Message-ID: <20080610055032.A8AB25A0E@siro.lan> (raw)
In-Reply-To: Your message of "Fri, 6 Jun 2008 10:52:35 +0900" <20080606105235.3c94daaf.kamezawa.hiroyu@jp.fujitsu.com>

> For avoiding complicated rollbacks,
> I think of following ways of policy for task moving (you can add here.)
> 
>  1. Before moving usage, reserve usage in the new cgroup and old cgroup.
>     Pros.
>      - rollback will be very easy.
>     Cons.
>      - A task will use twice of its own usage virtaually for a while.
>      - some amount of cpu time will be necessary to move _Big_ apps.
>      - It's difficut to move _Big_ apps to small memcg.
>      - we have to add "special case" handling.
> 
>  2. Don't move any usage at task move. (current implementation.)
>     Pros.
>       - no complication in the code.
>     Cons.
>       - A task's usage is chareged to wrong cgroup.
>       - Not sure, but I believe the users don't want this.
> 
>  3. Use Lazy Manner
>       When the task moves, we can mark the pages used by it as
>       "Wrong Charge, Should be dropped", and add them some penalty in the LRU.
>     Pros.
>       - no complicated ones.
>       - the pages will be gradually moved at memory pressure.
>     Cons.
>       - A task's usage can exceed the limit for a while.
>       - can't handle mlocked() memory in proper way.
> 
>  4. Allow Half-moved state and abandon rollback.
>     Pros.
>       - no complicated ones in the code.
>     Cons.
>       - the users will be in chaos.

how about:

5. try to move charges as your patch does.
   if the target cgroup's usage is going to exceed the limit,
   try to shrink it.  if it failed, just leave it exceeded.
   (ie. no rollback)
   for the memory subsystem, which can use its OOM killer,
   the failure should be rare.

> After writing this patch, for me, "3" is attractive. now.
> (or using Lazy manner and allow moving of usage instead of freeing it.)
> 
> One reasone is that I think a typical usage of memory controller is
> fork()->move->exec(). (by libcg ?) and exec() will flush the all usage.

i guess that moving long-running applications can be desirable
esp. for not so well-designed systems.

YAMAMOTO Takashi

--
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-06-10  5:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-06  1:52 KAMEZAWA Hiroyuki
2008-06-10  5:50 ` YAMAMOTO Takashi [this message]
2008-06-10  8:13   ` KAMEZAWA Hiroyuki
2008-06-10 12:57     ` YAMAMOTO Takashi
2008-06-11  2:02       ` KAMEZAWA Hiroyuki
2008-06-11  3:45         ` YAMAMOTO Takashi
2008-06-11  4:08           ` KAMEZAWA Hiroyuki
2008-06-10  7:35 ` Daisuke Nishimura
2008-06-10  8:26   ` KAMEZAWA Hiroyuki
2008-06-11  3:03     ` Daisuke Nishimura
2008-06-11  3:25       ` KAMEZAWA Hiroyuki
2008-06-11  3:44         ` YAMAMOTO Takashi
2008-06-11  4:14           ` KAMEZAWA Hiroyuki
2008-06-11  4:29             ` Daisuke Nishimura
2008-06-11  4:40               ` KAMEZAWA Hiroyuki
2008-06-12  5:20             ` YAMAMOTO Takashi
2008-06-12  6:51               ` KAMEZAWA Hiroyuki
2008-06-11  7:17 ` Paul Menage
2008-06-11  7:45   ` KAMEZAWA Hiroyuki
2008-06-11  8:04     ` Paul Menage
2008-06-11  8:27       ` KAMEZAWA Hiroyuki
2008-06-11  8:48         ` Paul Menage
2008-06-12  5:08           ` KAMEZAWA Hiroyuki
2008-06-12 13:17             ` Serge E. Hallyn
2008-06-12 13:34             ` kamezawa.hiroyu
2008-06-12 21:08               ` Serge E. Hallyn
2008-06-13  0:34                 ` KAMEZAWA Hiroyuki
2008-06-13  0:41                   ` KAMEZAWA Hiroyuki
2008-06-11  8:27   ` Balbir Singh
2008-06-11 12:21     ` Daisuke Nishimura
2008-06-11 12:51     ` kamezawa.hiroyu
2008-06-11 13:13       ` Balbir Singh

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=20080610055032.A8AB25A0E@siro.lan \
    --to=yamamoto@valinux.co.jp \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=menage@google.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --cc=xemul@openvz.org \
    /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