All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] impelemnt cgroup_(subsys)_disabled in generic.
@ 2011-11-23  8:28 ` KAMEZAWA Hiroyuki
  0 siblings, 0 replies; 18+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-11-23  8:28 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tejun Heo,
	lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, Michal Hocko,
	bsingharora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org


Now, memory cgroup has 'mem_cgroup_disabled()' in memcontrol.h

I made a brief trial to use static_branch() for that function. At doing that,
I thought it will be better to implement generic cgroup functions rather
than having memory cgroup's its own one.

This series consists of 3 patches
1 .... implement cgroup_xxxx_disabled() in generic.
2 .... use jump_label for cgroup_xxxx_disabled()
3 .... remove mem_cgroup_disabled() in memcontrol.c

And I post this series for getting review/comments.
I'm not sure patches for using jump_label is worth to be merged.

I did a test to run a loop
	while(-) {
		mmap(1M)
		touch all pages
		munmap()
	}

and measured performance score in ROOT cgroup. Here,

(Before patch)
   182,932,842,128 cycles                    #    0.000 GHz                     [33.33%]
   192,711,643,877 instructions              #    1.05  insns per cycle         [49.99%]
       761,483,416 cache-references                                             [49.98%]
           159,908 cache-misses              #    0.021 % of all cache refs     [50.00%]
    33,253,084,874 branches                                                     [33.34%]
       109,796,792 branch-misses             #    0.33% of all branches         [33.34%]

      58.289265709 seconds time elapsed

(After patch)
 Performance counter stats for './malloc 1':

   183,068,407,487 cycles                    #    0.000 GHz                     [33.33%]
   191,834,248,678 instructions              #    1.05  insns per cycle         [50.00%]
       798,635,028 cache-references                                             [49.98%]
            95,562 cache-misses              #    0.012 % of all cache refs     [50.00%]
    32,755,318,286 branches                                                     [33.34%]
        77,774,624 branch-misses             #    0.24% of all branches         [33.34%]

      58.332356996 seconds time elapsed

There is no differece in 'time' ;) 
But I got an impression that 'branch' score gets better in several tests.

Thanks,
-Kame

P.S. maybe I can replace 'do_swap_account' with jump_label, too.



--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2011-11-24  3:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23  8:28 [RFC][PATCH 0/3] impelemnt cgroup_(subsys)_disabled in generic KAMEZAWA Hiroyuki
2011-11-23  8:28 ` KAMEZAWA Hiroyuki
     [not found] ` <20111123172840.acd53c41.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2011-11-23  8:31   ` [RFC][PATCH 1/3] add cgroup_xxxx_disabled functions KAMEZAWA Hiroyuki
2011-11-23  8:31     ` KAMEZAWA Hiroyuki
2011-11-23  8:32   ` [RFC][PATCH 2/3] use static_branch for cgroup_xxxx_disabled KAMEZAWA Hiroyuki
2011-11-23  8:32     ` KAMEZAWA Hiroyuki
2011-11-23  8:34   ` [RFC][PATCH 3/3] replace mem_cgroup_disabled KAMEZAWA Hiroyuki
2011-11-23  8:34     ` KAMEZAWA Hiroyuki
2011-11-23 10:43     ` Glauber Costa
2011-11-23 10:43       ` Glauber Costa
     [not found]       ` <4ECCCE43.9090904-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2011-11-24  0:20         ` KAMEZAWA Hiroyuki
2011-11-24  0:20           ` KAMEZAWA Hiroyuki
2011-11-23 10:32   ` [RFC][PATCH 0/3] impelemnt cgroup_(subsys)_disabled in generic Glauber Costa
2011-11-23 10:32     ` Glauber Costa
2011-11-24  2:22   ` Li Zefan
2011-11-24  2:22     ` Li Zefan
     [not found]     ` <4ECDAA55.1030102-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2011-11-24  3:18       ` KAMEZAWA Hiroyuki
2011-11-24  3:18         ` 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.