Messages in this thread | | | Date | Fri, 5 Jun 2009 11:20:36 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [PATCH] remove memory.limit v.s. memsw.limit comparison. |
| |
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. >
| |