linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] memcg soft limit (yet another new design) v1
@ 2009-03-27  4:59 KAMEZAWA Hiroyuki
  2009-03-27  5:01 ` [RFC][PATCH 1/8] soft limit support in res_counter KAMEZAWA Hiroyuki
                   ` (11 more replies)
  0 siblings, 12 replies; 41+ messages in thread
From: KAMEZAWA Hiroyuki @ 2009-03-27  4:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm, balbir, kosaki.motohiro, nishimura

Hi,

Memory cgroup's soft limit feature is a feature to tell global LRU 
"please reclaim from this memcg at memory shortage".

And Balbir's one and my one was proposed.
This is new one. (so restart from v1), this is very new-born.

While testing soft limit, my dilemma was following.

 - needs additional cost of can if implementation is naive (unavoidable?)

 - Inactive/Active rotation scheme of global LRU will be broken.

 - File/Anon reclaim ratio scheme of global LRU will be broken.
    - vm.swappiness will be ignored.

 - If using memcg's memory reclaim routine, 
    - shrink_slab() will be never called.
    - stale SwapCache has no chance to be reclaimed (stale SwapCache means
      readed but not used one.)
    - memcg can have no memory in a zone.
    - memcg can have no Anon memory
    - lumpty_reclaim() is not called.


This patch tries to avoid to use existing memcg's reclaim routine and
just tell "Hints" to global LRU. This patch is briefly tested and shows
good result to me. (But may not to you. plz brame me.)

Major characteristic is.
 - memcg will be inserted to softlimit-queue at charge() if usage excess
   soft limit.
 - softlimit-queue is a queue with priority. priority is detemined by size
   of excessing usage.
 - memcg's soft limit hooks is called by shrink_xxx_list() to show hints.
 - Behavior is affected by vm.swappiness and LRU scan rate is determined by
   global LRU's status.

I'm sorry that I'm tend not to tell enough explanation.  plz ask me.
There will be much discussion points, anyway. As usual, I'm not in hurry.


==brief test result==
On 2CPU/1.6GB bytes machine. create group A and B
  A.  soft limit=300M
  B.  no soft limit

  Run a malloc() program on B and allcoate 1G of memory. The program just
  sleeps after allocating memory and no memory refernce after it.
  Run make -j 6 and compile the kernel.

  When vm.swappiness = 60  => 60MB of memory are swapped out from B.
  When vm.swappiness = 10  => 1MB of memory are swapped out from B    

  If no soft limit, 350MB of swap out will happen from B.(swapiness=60)

I'll try much more complexed ones in the weekend.

Thanks,
-Kame































--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2009-04-01 15:11 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-27  4:59 [RFC][PATCH] memcg soft limit (yet another new design) v1 KAMEZAWA Hiroyuki
2009-03-27  5:01 ` [RFC][PATCH 1/8] soft limit support in res_counter KAMEZAWA Hiroyuki
2009-03-27  5:03 ` [RFC][PATCH 2/8] soft limit framework in memcg KAMEZAWA Hiroyuki
2009-03-27  8:01   ` KAMEZAWA Hiroyuki
2009-03-29 17:22   ` Balbir Singh
2009-03-27  5:05 ` [RFC][PATCH 3/8] trigger for updating soft limit information KAMEZAWA Hiroyuki
2009-03-27  5:06 ` [RFC][PATCH 4/8] memcg soft limit priority array queue KAMEZAWA Hiroyuki
2009-03-29 16:56   ` Balbir Singh
2009-03-30 23:58     ` KAMEZAWA Hiroyuki
2009-03-27  5:09 ` [RFC][PATCH 5/8] memcg soft limit (yet another new design) v1 KAMEZAWA Hiroyuki
2009-03-27  5:14   ` KAMEZAWA Hiroyuki
2009-03-31  8:18   ` KAMEZAWA Hiroyuki
2009-03-27  5:11 ` [RFC][PATCH 6/8] soft limit victim select KAMEZAWA Hiroyuki
2009-03-27  5:12 ` [RFC][PATCH 7/8] memcg soft limit LRU reorder KAMEZAWA Hiroyuki
2009-03-30  7:52   ` Balbir Singh
2009-03-31  0:00     ` KAMEZAWA Hiroyuki
2009-03-31  6:06       ` Balbir Singh
2009-03-31  6:19         ` KAMEZAWA Hiroyuki
2009-03-27  5:13 ` [RFC][PATCH 8/8] extends soft limit event filter KAMEZAWA Hiroyuki
2009-03-28  8:23 ` [RFC][PATCH] memcg soft limit (yet another new design) v1 Balbir Singh
2009-03-28 16:10   ` KAMEZAWA Hiroyuki
2009-03-28 18:11 ` Balbir Singh
2009-03-28 18:27   ` Balbir Singh
2009-03-30 23:55     ` KAMEZAWA Hiroyuki
2009-03-31  5:00       ` Balbir Singh
2009-03-31  5:05         ` KAMEZAWA Hiroyuki
2009-03-31  5:18           ` KAMEZAWA Hiroyuki
2009-03-31  6:10           ` Balbir Singh
2009-03-31  6:28             ` KAMEZAWA Hiroyuki
2009-03-31  6:49               ` Balbir Singh
2009-03-31  6:56                 ` KAMEZAWA Hiroyuki
2009-03-31  6:58                 ` KAMEZAWA Hiroyuki
2009-03-31  0:06     ` KAMEZAWA Hiroyuki
2009-03-31  5:01       ` Balbir Singh
2009-03-31  5:11         ` KAMEZAWA Hiroyuki
2009-03-31  6:07           ` Balbir Singh
2009-03-30 23:54   ` KAMEZAWA Hiroyuki
2009-03-29 13:01 ` Balbir Singh
2009-03-30 23:57   ` KAMEZAWA Hiroyuki
2009-04-01 14:42 ` Balbir Singh
2009-04-01 15:11   ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox