All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC v2 0/4] cgroup notifications API and memory thresholds
@ 2009-12-11 22:59 ` Kirill A. Shutemov
  0 siblings, 0 replies; 83+ messages in thread
From: Kirill A. Shutemov @ 2009-12-11 22:59 UTC (permalink / raw)
  To: containers, linux-mm
  Cc: Paul Menage, Li Zefan, Andrew Morton, KAMEZAWA Hiroyuki,
	Balbir Singh, Pavel Emelyanov, Dan Malek, Vladislav Buzov,
	Daisuke Nishimura, linux-kernel, Kirill A. Shutemov

This patchset introduces eventfd-based API for notifications in cgroups and
implements memory notifications on top of it.

It uses statistics in memory controler to track memory usage.

Before changes:

Root cgroup
 Performance counter stats for './multi-fault 2' (5 runs):

  117596.249864  task-clock-msecs         #      1.960 CPUs    ( +-   0.043% )
          80114  context-switches         #      0.001 M/sec   ( +-   0.234% )
             80  CPU-migrations           #      0.000 M/sec   ( +-  24.934% )
       39120862  page-faults              #      0.333 M/sec   ( +-   0.138% )
   294682530295  cycles                   #   2505.884 M/sec   ( +-   0.076% )  (scaled from 70.00%)
   191303772329  instructions             #      0.649 IPC     ( +-   0.041% )  (scaled from 80.01%)
    39400843259  branches                 #    335.052 M/sec   ( +-   0.062% )  (scaled from 80.02%)
      497810459  branch-misses            #      1.263 %       ( +-   1.584% )  (scaled from 80.02%)
     3352408601  cache-references         #     28.508 M/sec   ( +-   0.251% )  (scaled from 19.98%)
         128744  cache-misses             #      0.001 M/sec   ( +-   4.542% )  (scaled from 19.98%)

   60.001025199  seconds time elapsed   ( +-   0.000% )

Non-root cgroup
 Performance counter stats for './multi-fault 2' (5 runs):

  116907.543887  task-clock-msecs         #      1.948 CPUs    ( +-   0.087% )
          70497  context-switches         #      0.001 M/sec   ( +-   0.204% )
             94  CPU-migrations           #      0.000 M/sec   ( +-  11.854% )
       33894593  page-faults              #      0.290 M/sec   ( +-   0.123% )
   291912994149  cycles                   #   2496.956 M/sec   ( +-   0.102% )  (scaled from 70.03%)
   194998499007  instructions             #      0.668 IPC     ( +-   0.109% )  (scaled from 80.01%)
    41752189092  branches                 #    357.139 M/sec   ( +-   0.118% )  (scaled from 79.96%)
      487437901  branch-misses            #      1.167 %       ( +-   0.378% )  (scaled from 79.95%)
     3076284269  cache-references         #     26.314 M/sec   ( +-   0.471% )  (scaled from 20.04%)
         170468  cache-misses             #      0.001 M/sec   ( +-   1.481% )  (scaled from 20.05%)

   60.001211398  seconds time elapsed   ( +-   0.000% )

After changes:

Root cgroup
 Performance counter stats for './multi-fault 2' (5 runs):

  117396.738764  task-clock-msecs         #      1.957 CPUs    ( +-   0.047% )
          78763  context-switches         #      0.001 M/sec   ( +-   0.132% )
            109  CPU-migrations           #      0.000 M/sec   ( +-  25.646% )
       38141062  page-faults              #      0.325 M/sec   ( +-   0.107% )
   294257674123  cycles                   #   2506.523 M/sec   ( +-   0.045% )  (scaled from 70.01%)
   194937378540  instructions             #      0.662 IPC     ( +-   0.120% )  (scaled from 79.98%)
    40694602714  branches                 #    346.642 M/sec   ( +-   0.127% )  (scaled from 79.95%)
      529968529  branch-misses            #      1.302 %       ( +-   1.668% )  (scaled from 79.94%)
     3196763471  cache-references         #     27.230 M/sec   ( +-   0.262% )  (scaled from 20.05%)
         201095  cache-misses             #      0.002 M/sec   ( +-   3.315% )  (scaled from 20.06%)

   60.001025546  seconds time elapsed   ( +-   0.000% )

Non-root cgroup:
 Performance counter stats for './multi-fault 2' (5 runs):

  116471.855099  task-clock-msecs         #      1.941 CPUs    ( +-   0.067% )
          69393  context-switches         #      0.001 M/sec   ( +-   0.099% )
            117  CPU-migrations           #      0.000 M/sec   ( +-  14.049% )
       33043048  page-faults              #      0.284 M/sec   ( +-   0.086% )
   290751403642  cycles                   #   2496.323 M/sec   ( +-   0.073% )  (scaled from 69.97%)
   196594115294  instructions             #      0.676 IPC     ( +-   0.065% )  (scaled from 79.97%)
    42507307304  branches                 #    364.958 M/sec   ( +-   0.054% )  (scaled from 79.96%)
      500670691  branch-misses            #      1.178 %       ( +-   0.729% )  (scaled from 79.98%)
     2935664654  cache-references         #     25.205 M/sec   ( +-   0.153% )  (scaled from 20.04%)
         224967  cache-misses             #      0.002 M/sec   ( +-   2.462% )  (scaled from 20.02%)

   60.001218531  seconds time elapsed   ( +-   0.000% )

Any comments?

TODO:
 - documentation.

v1 -> v2:
 - use statistics instead of res_counter to track resource usage;
 - fix bugs with locking;

v0 -> v1:
 - memsw support implemented.

Kirill A. Shutemov (4):
  cgroup: implement eventfd-based generic API for notifications
  memcg: extract mem_group_usage() from mem_cgroup_read()
  memcg: rework usage of stats by soft limit
  memcg: implement memory thresholds

 include/linux/cgroup.h |   20 +++
 kernel/cgroup.c        |  215 ++++++++++++++++++++++++++++++-
 mm/memcontrol.c        |  335 ++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 543 insertions(+), 27 deletions(-)


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

end of thread, other threads:[~2009-12-16  8:40 UTC | newest]

Thread overview: 83+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 22:59 [PATCH RFC v2 0/4] cgroup notifications API and memory thresholds Kirill A. Shutemov
2009-12-11 22:59 ` Kirill A. Shutemov
2009-12-11 22:59 ` [PATCH RFC v2 1/4] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-12-11 22:59   ` Kirill A. Shutemov
2009-12-15  9:11   ` Kirill A. Shutemov
2009-12-15  9:11     ` Kirill A. Shutemov
     [not found]     ` <cc557aab0912150111k41517b41t8999568db3bd8daa-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-15  9:35       ` KAMEZAWA Hiroyuki
2009-12-15  9:35     ` KAMEZAWA Hiroyuki
2009-12-15  9:35       ` KAMEZAWA Hiroyuki
2009-12-15 10:30       ` Kirill A. Shutemov
2009-12-15 10:30         ` Kirill A. Shutemov
2009-12-15 15:03       ` Kirill A. Shutemov
2009-12-15 15:03         ` Kirill A. Shutemov
     [not found]         ` <cc557aab0912150703qcfe6458paa7da71cb032cb93-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-15 23:55           ` KAMEZAWA Hiroyuki
2009-12-15 23:55         ` KAMEZAWA Hiroyuki
2009-12-15 23:55           ` KAMEZAWA Hiroyuki
     [not found]       ` <20091215183533.1a1e87d9.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-12-15 10:30         ` Kirill A. Shutemov
2009-12-15 15:03         ` Kirill A. Shutemov
2009-12-16  1:44   ` Li Zefan
2009-12-16  1:44     ` Li Zefan
2009-12-16  2:00     ` Li Zefan
2009-12-16  2:00       ` Li Zefan
     [not found]     ` <4B283B7F.2050403-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2009-12-16  2:00       ` Li Zefan
2009-12-16  5:46       ` Kirill A. Shutemov
2009-12-16  5:46     ` Kirill A. Shutemov
2009-12-16  5:46       ` Kirill A. Shutemov
     [not found]   ` <ca59c422b495907678915db636f70a8d029cbf3a.1260571675.git.kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2009-12-15  9:11     ` Kirill A. Shutemov
2009-12-16  1:44     ` Li Zefan
2009-12-11 22:59 ` [PATCH RFC v2 2/4] memcg: extract mem_group_usage() from mem_cgroup_read() Kirill A. Shutemov
2009-12-11 22:59   ` Kirill A. Shutemov
2009-12-16  8:40   ` Balbir Singh
2009-12-16  8:40     ` Balbir Singh
     [not found]   ` <c1847dfb5c4fed1374b7add236d38e0db02eeef3.1260571675.git.kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2009-12-16  8:40     ` Balbir Singh
2009-12-11 22:59 ` [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit Kirill A. Shutemov
2009-12-11 22:59   ` Kirill A. Shutemov
     [not found]   ` <747ea0ec22b9348208c80f86f7a813728bf8e50a.1260571675.git.kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2009-12-12  3:50     ` Daisuke Nishimura
2009-12-12  3:50   ` Daisuke Nishimura
2009-12-12  3:50     ` Daisuke Nishimura
2009-12-12 13:06     ` Kirill A. Shutemov
2009-12-12 13:06       ` Kirill A. Shutemov
2009-12-12 14:34       ` Daisuke Nishimura
2009-12-12 14:34         ` Daisuke Nishimura
     [not found]         ` <20091212233409.60da66fb.d-nishimura-1T/T2zRcyZr+G+EEi5ephHgSJqDPrsil@public.gmane.org>
2009-12-12 19:46           ` Kirill A. Shutemov
2009-12-12 19:46         ` Kirill A. Shutemov
2009-12-12 19:46           ` Kirill A. Shutemov
     [not found]           ` <cc557aab0912121146y276a8d26v8baee15be1f83a97-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-13  1:30             ` Daisuke Nishimura
2009-12-15  1:35             ` KAMEZAWA Hiroyuki
2009-12-13  1:30           ` Daisuke Nishimura
2009-12-13  1:30             ` Daisuke Nishimura
2009-12-15  1:35           ` KAMEZAWA Hiroyuki
2009-12-15  1:35             ` KAMEZAWA Hiroyuki
2009-12-15  7:48             ` Kirill A. Shutemov
2009-12-15  7:48               ` Kirill A. Shutemov
2009-12-15  8:07               ` KAMEZAWA Hiroyuki
2009-12-15  8:07                 ` KAMEZAWA Hiroyuki
     [not found]               ` <cc557aab0912142348j6d0f6206qd751f74e416c6710-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-15  8:07                 ` KAMEZAWA Hiroyuki
     [not found]             ` <20091215103517.75645536.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-12-15  7:48               ` Kirill A. Shutemov
     [not found]       ` <cc557aab0912120506x56b9a707ob556035fdcf40a22-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-12 14:34         ` Daisuke Nishimura
     [not found]     ` <20091212125046.14df3134.d-nishimura-1T/T2zRcyZr+G+EEi5ephHgSJqDPrsil@public.gmane.org>
2009-12-12 13:06       ` Kirill A. Shutemov
     [not found] ` <cover.1260571675.git.kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2009-12-11 22:59   ` [PATCH RFC v2 1/4] cgroup: implement eventfd-based generic API for notifications Kirill A. Shutemov
2009-12-11 22:59   ` [PATCH RFC v2 2/4] memcg: extract mem_group_usage() from mem_cgroup_read() Kirill A. Shutemov
2009-12-11 22:59   ` [PATCH RFC v2 3/4] memcg: rework usage of stats by soft limit Kirill A. Shutemov
2009-12-11 22:59   ` [PATCH RFC v2 4/4] memcg: implement memory thresholds Kirill A. Shutemov
2009-12-11 22:59 ` Kirill A. Shutemov
2009-12-11 22:59   ` Kirill A. Shutemov
2009-12-12  3:19   ` Daisuke Nishimura
2009-12-12  3:19     ` Daisuke Nishimura
     [not found]     ` <20091212121902.e95f9561.d-nishimura-1T/T2zRcyZr+G+EEi5ephHgSJqDPrsil@public.gmane.org>
2009-12-12 13:11       ` Kirill A. Shutemov
2009-12-12 13:11     ` Kirill A. Shutemov
2009-12-12 13:11       ` Kirill A. Shutemov
     [not found]       ` <cc557aab0912120511r7c83e97di3f97d2bb5eae326c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-12 13:13         ` Kirill A. Shutemov
2009-12-12 13:13       ` Kirill A. Shutemov
2009-12-12 13:13         ` Kirill A. Shutemov
     [not found]   ` <9e6e8d687224c6cbc54281f7c3d07983f701f93d.1260571675.git.kirill-oKw7cIdHH8eLwutG50LtGA@public.gmane.org>
2009-12-12  3:19     ` Daisuke Nishimura
2009-12-15  1:58     ` KAMEZAWA Hiroyuki
2009-12-15  1:58   ` KAMEZAWA Hiroyuki
2009-12-15  1:58     ` KAMEZAWA Hiroyuki
     [not found]     ` <20091215105850.87203454.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2009-12-15 10:46       ` Kirill A. Shutemov
2009-12-15 10:46     ` Kirill A. Shutemov
2009-12-15 10:46       ` Kirill A. Shutemov
2009-12-15 11:09       ` KAMEZAWA Hiroyuki
2009-12-15 11:09         ` KAMEZAWA Hiroyuki
     [not found]       ` <cc557aab0912150246k476aa85m6c1b61045fb0b26e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-12-15 11:09         ` KAMEZAWA Hiroyuki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.