[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090605112036.2dd64ab1.kamezawa.hiroyu@jp.fujitsu.com>
Date: Fri, 5 Jun 2009 11:20:36 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
Cc: balbir@...ux.vnet.ibm.com,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] remove memory.limit v.s. memsw.limit comparison.
On Fri, 5 Jun 2009 09:34:20 +0900
Daisuke Nishimura <nishimura@....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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists