memrlimit controller merge to mainline

KAMEZAWA Hiroyuki kamezawa.hiroyu at
Tue Jul 29 22:40:45 PDT 2008

Sorry for many mails ;(

I think I misunderstood something...

Following is ?

A brief summary about changes in memroy controller.
 - memory.limit_in_bytes works as it is now.
 - new parameter: memory.limit_in_bytes_includes_swap will be added.
   + memory.limit_in_bytes_includes_swap controlls the total amount of
     RAM + SWAP,
   + memory.limit_in_bytes <= memory.limit_in_bytes_includes_swap

As a result.
 - memory controller works as it is but doesn't use too much swap.
 - global-lru cannot be affected by controller's parameter.

Hmm, seems reasonable. minor problem is how-to-handle 2 counts/limits ?

BTW, does anyone have good names ?
  (example) memory.memory_limits_in_bytes.  (for accounting memory) 
            memory.total_limits_in_bytes.   (for accountign memory+swap)


On Wed, 30 Jul 2008 12:11:15 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu at> wrote:
> 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.
> Thanks,
> -Kame

More information about the Containers mailing list