LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [RFC][PATCH 0/5] memcg : some patches related to swap.
@ 2008-10-31  2:50 KAMEZAWA Hiroyuki
  2008-10-31  2:52 ` [RFC][PATCH 1/5] memcg : force_empty to do move account KAMEZAWA Hiroyuki
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: KAMEZAWA Hiroyuki @ 2008-10-31  2:50 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel, balbir, nishimura, hugh, taka

This patch is memcg update set. (the last post was 23/Oct)

This patch is agaisnt 2.6.28-rc2-mm1. (mmotm at 30/Oct)

Major changes from previous one.
 - dropped lazy_lru related patches. It's complicated and I'd like to
   design it again. (Nishimura-san reported a bug to me.)
   Fortunately, no big Hunk.

 - added a patch for swap_cache. (cut out from mem+swap controller.)
   IMHO, this is necessary to do. But previous trial (in summer) caused tons of
   troubles. I think currrent memcg's code is better than old ones and I hope
   this trial will be much easier.
 
and fixed typos and logics.

brief patch description is here. I'd like to send [1/5] in the next week.
Review and test is welcome. [2-5/5] of patches should be tested more.
And I'd like to clean up them before sending...

[1/5] change force_empty to do move account.
  - current force_empty just drops page_cgroup reference. But this means
    leak of accounting. After this patch, remaining pages at rmdir() will be
    moved to parent group.

[2/5] account swap cache
  - when processes exceed limit of memory, swap-cache can be created.
    Now, swap-cache is not accounted and can be spread over hundreds of mega
    bytes. I don't think this is sane. This patch makes swap_cache to be accounted.

[3/5] mem+swap controller config.
  - add Kconfig for mem+swap controller.

[4/5] swap_cgroup
  - create a buffer to remember account information of swap.
    Because my x86-32 test environment is poor, x86-32 test report is welcome.
    This patch uses HIGHMEM to rememver information.

[5/5]
  - mem+swap controller.
  After this patch, a page swapped-in will be accounted against an original group
  which allocated memory swapped-out.
  This is not swap controller but mem+swap controller. This limits sum of
  pages + swaps_on_disk. By this,
  - global LRU's swap-out will not hit the limit. (page is converted to swap.)
  - a group of processes leaking memory will be effectively blocked.

TODO list:
 - more optimization
 - add "shrink_usage" file
 - remove mem_cgroup_per_zone->lock and use zone->lru_lock ?
 - consider behavior of oom-kill again.
 - need some notifier to tell memory shortage as mem_notity ?
 - dirty page accountng and throttle.
 - we have to decied how to handle HUGE_PAGE
 - kernel support for hierarchy ?
 - help bio_cgroup people.

Oh, too long ;)

Thanks,
-Kame  




  





^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-11-05  2:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-31  2:50 [RFC][PATCH 0/5] memcg : some patches related to swap KAMEZAWA Hiroyuki
2008-10-31  2:52 ` [RFC][PATCH 1/5] memcg : force_empty to do move account KAMEZAWA Hiroyuki
2008-10-31  9:25   ` Daisuke Nishimura
2008-11-04  6:15   ` Paul Menage
2008-11-04  6:17     ` KAMEZAWA Hiroyuki
2008-11-04  6:23       ` Paul Menage
2008-11-04  6:25         ` KAMEZAWA Hiroyuki
2008-10-31  2:54 ` [RFC][PATCH 2/5] memcg : handle swap cache KAMEZAWA Hiroyuki
2008-11-04  8:42   ` Daisuke Nishimura
2008-11-04  9:04     ` KAMEZAWA Hiroyuki
2008-11-04 10:28       ` Daisuke Nishimura
2008-11-05  0:07         ` KAMEZAWA Hiroyuki
2008-11-05  2:03           ` KAMEZAWA Hiroyuki
2008-10-31  2:55 ` [RFC][PATCH 3/5] memcg : mem+swap controller kconfig KAMEZAWA Hiroyuki
2008-11-04  8:54   ` Daisuke Nishimura
2008-11-04  9:13     ` KAMEZAWA Hiroyuki
2008-10-31  2:58 ` [RFC][PATCH 4/5] memcg : add swap_cgroup KAMEZAWA Hiroyuki
2008-10-31  2:59 ` [RFC][PATCH 5/5] memcg : mem+swap controller KAMEZAWA Hiroyuki
2008-11-02  6:43 ` [RFC][PATCH 6/5] memcg : synchronous LRU KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).