linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: balbir@linux.vnet.ibm.com,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] remove memory.limit v.s. memsw.limit comparison.
Date: Fri, 5 Jun 2009 11:20:36 +0900	[thread overview]
Message-ID: <20090605112036.2dd64ab1.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090605093420.0b208c33.nishimura@mxp.nes.nec.co.jp>

On Fri, 5 Jun 2009 09:34:20 +0900
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
> > Sorry, I don't push this patch as this is. But adding documentation about
> > "What happens when you set memory.limit == memsw.limit" will be necessary.
> > 
> I agree.
> 
I'd like to prepare some.

> > ...maybe give all jobs to user-land and keep the kernel as it is now
> > is a good choice.
> > 
> > BTW, I'd like to avoid useless swap-out in memory.limit == memsw.limit case.
> > If someone has good idea, please :(
> > 
> I think so too.
> 
> From my simple thoughts, how about changing __mem_cgroup_try_charge() like:
> 
> 1. initialize "noswap" as "bool noswap = !!(mem->res.limit == mem->memsw.limit)".
> 2. add check "if (mem->res.limit == mem->memsw.limit)" on charge failure to mem->res
>    and set "noswap" to true if needed. 
> 3. charge mem->memsw before mem->res.
> 
> There would be other ideas, but I prefer 1 among these choices.
> 
ok, thank you for advices.

Regards,
-Kame


> 
> Thanks,
> Daisuke Nishimura.
> 

--
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-05  2:22 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
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 [this message]
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=20090605112036.2dd64ab1.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