Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-17 Thread Tejun Heo
Hello, Michal. On Mon, Jun 17, 2013 at 03:27:44PM +0200, Michal Hocko wrote: > Thanks for your results! Yes the boost can be really high. I will try to > measure some memcg workloads as soon as I have some spare cycles. I do > not expect a big win but I also do not think this would regress. With

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-17 Thread Michal Hocko
On Fri 14-06-13 22:35:22, Tejun Heo wrote: > On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: > > I'll play with it a bit more on an actual machine and post more > > results. Test program attached. > > So, here are the results from the same test on a dual-socket 2-way > NUMA opteron 8

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-17 Thread Michal Hocko
On Fri 14-06-13 22:35:22, Tejun Heo wrote: On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: I'll play with it a bit more on an actual machine and post more results. Test program attached. So, here are the results from the same test on a dual-socket 2-way NUMA opteron 8 core

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-17 Thread Tejun Heo
Hello, Michal. On Mon, Jun 17, 2013 at 03:27:44PM +0200, Michal Hocko wrote: Thanks for your results! Yes the boost can be really high. I will try to measure some memcg workloads as soon as I have some spare cycles. I do not expect a big win but I also do not think this would regress. With

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-15 Thread Tejun Heo
On Fri, Jun 14, 2013 at 10:35:22PM -0700, Tejun Heo wrote: > On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: > > I'll play with it a bit more on an actual machine and post more > > results. Test program attached. > > So, here are the results from the same test on a dual-socket 2-way >

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-15 Thread Tejun Heo
On Fri, Jun 14, 2013 at 10:35:22PM -0700, Tejun Heo wrote: On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: I'll play with it a bit more on an actual machine and post more results. Test program attached. So, here are the results from the same test on a dual-socket 2-way NUMA

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Tejun Heo
On Fri, Jun 14, 2013 at 10:35:22PM -0700, Tejun Heo wrote: > On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: > > I'll play with it a bit more on an actual machine and post more > > results. Test program attached. > > So, here are the results from the same test on a dual-socket 2-way >

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Tejun Heo
On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: > I'll play with it a bit more on an actual machine and post more > results. Test program attached. So, here are the results from the same test on a dual-socket 2-way NUMA opteron 8 core machine. Running on one CPU. copy size

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Tejun Heo
Hello, Michal. On Fri, Jun 14, 2013 at 03:20:26PM +0200, Michal Hocko wrote: > I have no objections to change css reference counting scheme if the > guarantees we used to have are still valid. I am just missing some > comparisons. Do you have any numbers that would show benefits clearly?

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Michal Hocko
On Fri 14-06-13 18:15:12, Glauber Costa wrote: > On Fri, Jun 14, 2013 at 02:55:39PM +0200, Michal Hocko wrote: > > On Wed 12-06-13 21:04:58, Tejun Heo wrote: > > [...] > > > +/** > > > + * cgroup_destroy_locked - the first stage of cgroup destruction > > > + * @cgrp: cgroup to be destroyed > > > +

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Glauber Costa
On Fri, Jun 14, 2013 at 02:55:39PM +0200, Michal Hocko wrote: > On Wed 12-06-13 21:04:58, Tejun Heo wrote: > [...] > > +/** > > + * cgroup_destroy_locked - the first stage of cgroup destruction > > + * @cgrp: cgroup to be destroyed > > + * > > + * css's make use of percpu refcnts whose killing

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Michal Hocko
On Wed 12-06-13 21:04:58, Tejun Heo wrote: > A css (cgroup_subsys_state) is how each cgroup is represented to a > controller. As such, it can be used in hot paths across the various > subsystems different controllers are associated with. > > One of the common operations is reference counting,

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Michal Hocko
On Wed 12-06-13 21:04:58, Tejun Heo wrote: [...] > +/** > + * cgroup_destroy_locked - the first stage of cgroup destruction > + * @cgrp: cgroup to be destroyed > + * > + * css's make use of percpu refcnts whose killing latency shouldn't be > + * exposed to userland and are RCU protected. Also,

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Michal Hocko
On Wed 12-06-13 21:04:58, Tejun Heo wrote: [...] +/** + * cgroup_destroy_locked - the first stage of cgroup destruction + * @cgrp: cgroup to be destroyed + * + * css's make use of percpu refcnts whose killing latency shouldn't be + * exposed to userland and are RCU protected. Also, cgroup

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Michal Hocko
On Wed 12-06-13 21:04:58, Tejun Heo wrote: A css (cgroup_subsys_state) is how each cgroup is represented to a controller. As such, it can be used in hot paths across the various subsystems different controllers are associated with. One of the common operations is reference counting, which

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Glauber Costa
On Fri, Jun 14, 2013 at 02:55:39PM +0200, Michal Hocko wrote: On Wed 12-06-13 21:04:58, Tejun Heo wrote: [...] +/** + * cgroup_destroy_locked - the first stage of cgroup destruction + * @cgrp: cgroup to be destroyed + * + * css's make use of percpu refcnts whose killing latency

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Michal Hocko
On Fri 14-06-13 18:15:12, Glauber Costa wrote: On Fri, Jun 14, 2013 at 02:55:39PM +0200, Michal Hocko wrote: On Wed 12-06-13 21:04:58, Tejun Heo wrote: [...] +/** + * cgroup_destroy_locked - the first stage of cgroup destruction + * @cgrp: cgroup to be destroyed + * + * css's

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Tejun Heo
Hello, Michal. On Fri, Jun 14, 2013 at 03:20:26PM +0200, Michal Hocko wrote: I have no objections to change css reference counting scheme if the guarantees we used to have are still valid. I am just missing some comparisons. Do you have any numbers that would show benefits clearly? Mikulas'

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Tejun Heo
On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: I'll play with it a bit more on an actual machine and post more results. Test program attached. So, here are the results from the same test on a dual-socket 2-way NUMA opteron 8 core machine. Running on one CPU. copy size

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-14 Thread Tejun Heo
On Fri, Jun 14, 2013 at 10:35:22PM -0700, Tejun Heo wrote: On Fri, Jun 14, 2013 at 03:31:25PM -0700, Tejun Heo wrote: I'll play with it a bit more on an actual machine and post more results. Test program attached. So, here are the results from the same test on a dual-socket 2-way NUMA

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-13 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 09:04:58PM -0700, Tejun Heo wrote: > A css (cgroup_subsys_state) is how each cgroup is represented to a > controller. As such, it can be used in hot paths across the various > subsystems different controllers are associated with. > > One of the common operations is

Re: [PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-13 Thread Kent Overstreet
On Wed, Jun 12, 2013 at 09:04:58PM -0700, Tejun Heo wrote: A css (cgroup_subsys_state) is how each cgroup is represented to a controller. As such, it can be used in hot paths across the various subsystems different controllers are associated with. One of the common operations is reference

[PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-12 Thread Tejun Heo
A css (cgroup_subsys_state) is how each cgroup is represented to a controller. As such, it can be used in hot paths across the various subsystems different controllers are associated with. One of the common operations is reference counting, which up until now has been implemented using a global

[PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-12 Thread Tejun Heo
A css (cgroup_subsys_state) is how each cgroup is represented to a controller. As such, it can be used in hot paths across the various subsystems different controllers are associated with. One of the common operations is reference counting, which up until now has been implemented using a global

[PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-12 Thread Tejun Heo
A css (cgroup_subsys_state) is how each cgroup is represented to a controller. As such, it can be used in hot paths across the various subsystems different controllers are associated with. One of the common operations is reference counting, which up until now has been implemented using a global

[PATCH 11/11] cgroup: use percpu refcnt for cgroup_subsys_states

2013-06-12 Thread Tejun Heo
A css (cgroup_subsys_state) is how each cgroup is represented to a controller. As such, it can be used in hot paths across the various subsystems different controllers are associated with. One of the common operations is reference counting, which up until now has been implemented using a global