linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [PATCH] remove memory.limit v.s. memsw.limit comparison.
Date: Thu, 4 Jun 2009 17:39:18 +0900	[thread overview]
Message-ID: <20090604173918.3b2c68f5.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090604083110.GD7504@balbir.in.ibm.com>

On Thu, 4 Jun 2009 16:31:10 +0800
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-06-04 14:10:43]:
> 
> > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> > 
> > Removes memory.limit < memsw.limit at setting limit check completely.
> > 
> > The limitation "memory.limit <= memsw.limit" was added just because
> > it seems sane ...if memory.limit > memsw.limit, only memsw.limit works.
> > 
> > But To implement this limitation, we needed to use private mutex and make
> > the code a bit complated.
> > As Nishimura pointed out, in real world, there are people who only want
> > to use memsw.limit.
> > 
> > Then, this patch removes the check. user-land library or middleware can check
> > this in userland easily if this really concerns.
> > 
> > And this is a good change to charge-and-reclaim.
> > 
> > Now, memory.limit is always checked before memsw.limit
> > and it may do swap-out. But, if memory.limit == memsw.limit, swap-out is
> > finally no help and hits memsw.limit again. So, let's allow the condition
> > memory.limit > memsw.limit. Then we can skip unnecesary swap-out.
> > 
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> 
> We can't change behaviour this way without breaking userspace scripts,
> API and code. What does it mean for people already using these
> features? Does it break their workflow?
> 

Hopefully no breaks to current users's workflow.
Because this just has influences to "error path" like below

 echo 200M > memory.memsw.limit
 echo 300M > memory.limit
 => ERROR

If the user program made in sane way, above case will never happens because
they set memsw.limit to be greater than memory.limit and above is treated as error.


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:[~2009-06-04  8:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-04  5:10 KAMEZAWA Hiroyuki
2009-06-04  5:33 ` Daisuke Nishimura
2009-06-04  8:31 ` Balbir Singh
2009-06-04  8:39   ` KAMEZAWA Hiroyuki [this message]
2009-06-04 12:36 ` Balbir Singh
2009-06-04 15:45   ` KAMEZAWA Hiroyuki
2009-06-05  0:34     ` Daisuke Nishimura
2009-06-05  2:20       ` KAMEZAWA Hiroyuki
2009-06-05  1:10     ` Balbir Singh
2009-06-05  2:19       ` KAMEZAWA Hiroyuki
2009-06-05  4:04       ` Daisuke Nishimura
2009-06-05  7:15 ` [PATCH] memcg: fix behavior under memory.limit equals to memsw.limit KAMEZAWA Hiroyuki

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=20090604173918.3b2c68f5.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nishimura@mxp.nes.nec.co.jp \
    /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