memrlimit controller merge to mainline
nishimura at mxp.nes.nec.co.jp
Tue Jul 29 21:58:03 PDT 2008
On Wed, 30 Jul 2008 13:14:07 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> On Wed, 30 Jul 2008 12:11:15 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> > On Wed, 30 Jul 2008 11:52:26 +0900
> > KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> > > mem+swap controller means a shrink to memory resource controller
> > > (try_to_free_mem_cgroup_pages()) should drop only file caches.
> > > (Because kick-out-to-swap will never changes the usage.)
> > >
> > > right ? only global-lru can make a swap.
> > > maybe I can add optimization to do this. Hmm. I should see how OOM works
> > > under some situation.
> > >
I'm thinking mem+swap controller in a different way: an add-on to
mem controller, just as current swap controller.
I mean adding "memory.(mem+swap)_limit".
> > (I'm sorry that I'm not a good writer of e-mail.)
> > A brief summary about changes to mem controller.
> > - mem+swap controller which limits the # sum of pages and swap_entries.
> > - mem+swap controller just drops file caches when it reaches limit.
> > - under mem+swap controller, recaliming Anon pages make no sense.
> > Then,
> > - LRU for Anon is not necessary.
> > - LRU for tmpfs/shmem is not necessary.
> > just showing account is better.
> > - we should see try_to_free_mem_cgroup() again to avoid too much OOM.
> > Maybe Retries=5 is too small because we never do swap under us.
> > a problem like struck-into-ext3-journal can easily make file-cache reclaim
> > difficult.
> > - need some changes to documentation.
> > - Should we have on/off switch of taking swap into account ?
> > or should we implement mem+swap contoller in different name than
> > "memory" controller ?
> > If swap is not accounted, we need to do swap-out in memory reclaiming path,
> > again.
> Then, mem+swap controller finally means
> - under mem+swap controller, program works with no swap. Only global LRU
> may make pages swapped-out.
> - If swap-accounting-mode is off, swap can be used unlimitedly.
> Hmm, sounds a bit differenct from what I want. How about others ?
More information about the Containers