Re: [PATCH v2 1/3] sched: introduce distinct per-cpu load average

2012-10-22 Thread Andrea Righi
On Mon, Oct 22, 2012 at 01:10:40PM +0200, Peter Zijlstra wrote: > On Sat, 2012-10-20 at 21:06 +0200, Andrea Righi wrote: > > @@ -383,13 +383,7 @@ struct rq { > > struct list_head leaf_rt_rq_list; > > #endif > > > > > + unsigned long __percpu *nr_uninterruptible; > > This is

Re: [PATCH v2 1/3] sched: introduce distinct per-cpu load average

2012-10-22 Thread Peter Zijlstra
On Sat, 2012-10-20 at 21:06 +0200, Andrea Righi wrote: > @@ -383,13 +383,7 @@ struct rq { > struct list_head leaf_rt_rq_list; > #endif > > + unsigned long __percpu *nr_uninterruptible; This is O(nr_cpus^2) memory.. > +unsigned long nr_uninterruptible_cpu(int cpu) > +{ > +

Re: [PATCH v2 1/3] sched: introduce distinct per-cpu load average

2012-10-22 Thread Peter Zijlstra
On Sat, 2012-10-20 at 21:06 +0200, Andrea Righi wrote: @@ -383,13 +383,7 @@ struct rq { struct list_head leaf_rt_rq_list; #endif + unsigned long __percpu *nr_uninterruptible; This is O(nr_cpus^2) memory.. +unsigned long nr_uninterruptible_cpu(int cpu) +{ +

Re: [PATCH v2 1/3] sched: introduce distinct per-cpu load average

2012-10-22 Thread Andrea Righi
On Mon, Oct 22, 2012 at 01:10:40PM +0200, Peter Zijlstra wrote: On Sat, 2012-10-20 at 21:06 +0200, Andrea Righi wrote: @@ -383,13 +383,7 @@ struct rq { struct list_head leaf_rt_rq_list; #endif + unsigned long __percpu *nr_uninterruptible; This is O(nr_cpus^2)

[PATCH v2 1/3] sched: introduce distinct per-cpu load average

2012-10-20 Thread Andrea Righi
Account load average, nr_running and nr_uninterruptible tasks per-cpu. The new task_struct attribute on_cpu_uninterruptible is added to properly keep track of the cpu at deactivate time, when the task is set to the uninterruptible sleep state. Moreover, rq->nr_uninterruptible is converted to a

[PATCH v2 1/3] sched: introduce distinct per-cpu load average

2012-10-20 Thread Andrea Righi
Account load average, nr_running and nr_uninterruptible tasks per-cpu. The new task_struct attribute on_cpu_uninterruptible is added to properly keep track of the cpu at deactivate time, when the task is set to the uninterruptible sleep state. Moreover, rq-nr_uninterruptible is converted to a