memrlimit controller merge to mainline

KAMEZAWA Hiroyuki kamezawa.hiroyu at
Tue Jul 29 20:11:15 PDT 2008

On Wed, 30 Jul 2008 11:52:26 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu at> 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 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.
      - 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
 - 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,


More information about the Containers mailing list