Re: [PATCH V2 Resend 3/4] workqueue: Schedule work on non-idle cpu instead of current one

2012-11-27 Thread Vincent Guittot
On 27 November 2012 06:19, Viresh Kumar wrote: > Hi Tejun, > > On 26 November 2012 22:45, Tejun Heo wrote: >> On Tue, Nov 06, 2012 at 04:08:45PM +0530, Viresh Kumar wrote: > >> I'm pretty skeptical about this. queue_work() w/o explicit CPU >> assignment has always guaranteed that the work item w

Re: [PATCH V2 Resend 3/4] workqueue: Schedule work on non-idle cpu instead of current one

2012-11-27 Thread Vincent Guittot
On 27 November 2012 14:59, Steven Rostedt wrote: > On Tue, 2012-11-27 at 19:18 +0530, Viresh Kumar wrote: >> On 27 November 2012 18:56, Steven Rostedt wrote: >> > A couple of things. The sched_select_cpu() is not cheap. It has a double >> > loop of domains/cpus looking for a non idle cpu. If we h

Re: [PATCH V2 Resend 3/4] workqueue: Schedule work on non-idle cpu instead of current one

2012-11-27 Thread Vincent Guittot
On 27 November 2012 16:04, Steven Rostedt wrote: > On Tue, 2012-11-27 at 15:55 +0100, Vincent Guittot wrote: >> On 27 November 2012 14:59, Steven Rostedt wrote: >> > On Tue, 2012-11-27 at 19:18 +0530, Viresh Kumar wrote: >> >> On 27 November 2012 18:56, Steven Roste

[PATCH v5] sched: fix init NOHZ_IDLE flag

2013-03-19 Thread Vincent Guittot
it was a side effect of the other use cases. Signed-off-by: Vincent Guittot --- include/linux/sched.h |6 +++ kernel/sched/core.c | 105 - kernel/sched/fair.c | 35 +++-- kernel/sched/sched.h | 24 +-- 4 files

Re: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-02-04 Thread Vincent Guittot
On 1 February 2013 19:03, Frederic Weisbecker wrote: > 2013/1/29 Vincent Guittot : >> On my smp platform which is made of 5 cores in 2 clusters,I have the >> nr_busy_cpu field of sched_group_power struct that is not null when the >> platform is fully idle. The root cause s

[PATCH] sched: fix wrong rq's runnable_avg update with rt task

2013-02-08 Thread Vincent Guittot
ime in the rq's load. Signed-off-by: Vincent Guittot --- kernel/sched/core.c |3 +++ kernel/sched/fair.c | 10 ++ kernel/sched/sched.h |5 + 3 files changed, 18 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 26058d0..592e06c 100644 --- a/

Re: [PATCH] sched: fix wrong rq's runnable_avg update with rt task

2013-02-08 Thread Vincent Guittot
On 8 February 2013 15:46, Steven Rostedt wrote: > On Fri, 2013-02-08 at 12:11 +0100, Vincent Guittot wrote: >> When a RT task is scheduled on an idle CPU, the update of the rq's load is >> not done because CFS's functions are not called. Then, the idle_balance, >&

Re: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-02-08 Thread Vincent Guittot
On 8 February 2013 16:35, Frederic Weisbecker wrote: > 2013/2/4 Vincent Guittot : >> On 1 February 2013 19:03, Frederic Weisbecker wrote: >>>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >>>> index 257002c..fd41924 100644 >>>> --- a/kerne

[PATCH v3 2/2] sched: fix update NOHZ_IDLE flag

2013-02-08 Thread Vincent Guittot
) first in order to detect such intialization step and to not modify the NOHZ_IDLE flag Signed-off-by: Vincent Guittot --- kernel/sched/fair.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5eea870..dac2edf 100644 --- a/kernel

[PATCH v3 0/2] sched: fix nr_busy_cpus

2013-02-08 Thread Vincent Guittot
state instead of busy state so a CPU that enters idle during the build of the sched_domain will not corrupt the initialization state Change since V1: - remove the patch for SCHED softirq on an idle core use case as it was a side effect of the other use cases. Vincent Guittot (2): sched

[PATCH v3 1/2] sched: fix init NOHZ_IDLE flag

2013-02-08 Thread Vincent Guittot
/2 protects this init against an update of NOHZ_IDLE flag because a NULL sched_domain is attached to the CPU during the build of the new sched_domain so nohz_kick_needed and set_cpu_sd_state_busy are not called and can't clear the NOHZ_IDLE flag Signed-off-by: Vincent Guittot --- kernel/

Re: [PATCH v5 00/45] CPU hotplug: stop_machine()-free CPU hotplug

2013-02-11 Thread Vincent Guittot
Hi Srivatsa, I can try to run some of our stress tests on your patches. Have you got a git tree that i can pull ? Regards, Vincent On 8 February 2013 19:09, Srivatsa S. Bhat wrote: > On 02/08/2013 10:14 PM, Srivatsa S. Bhat wrote: >> On 02/08/2013 09:11 PM, Russell King - ARM Linux wrote: >>> O

[PATCH] sched: fix env->src_cpu for active migration

2013-02-12 Thread Vincent Guittot
need_active_balance uses env->src_cpu which is set only if there is more than 1 task on the run queue. We must set the src_cpu field unconditionnally otherwise the test "env->src_cpu > env->dst_cpu" will always fail if there is only 1 task on the run queue Signed-o

[PATCH v2] sched: fix wrong rq's runnable_avg update with rt task

2013-02-12 Thread Vincent Guittot
ime in the rq's load. Changes since V1: - move code out of schedule function and create a pre_schedule callback for idle class instead. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 10 ++ kernel/sched/idle_task.c |7 +++ kernel/sched/sched.h |5 +

Re: [PATCH v2] sched: fix wrong rq's runnable_avg update with rt task

2013-02-12 Thread Vincent Guittot
On 12 February 2013 14:23, Vincent Guittot wrote: > When a RT task is scheduled on an idle CPU, the update of the rq's load is > not done because CFS's functions are not called. Then, the idle_balance, > which is called just before entering the idle function, updates the > r

Re: [PATCH v2] sched: fix wrong rq's runnable_avg update with rt task

2013-02-12 Thread Vincent Guittot
On 12 February 2013 15:53, Steven Rostedt wrote: > On Tue, 2013-02-12 at 14:23 +0100, Vincent Guittot wrote: >> .set_curr_task = set_curr_task_idle, >> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h >> index fc88644..9707092 100644 >> --- a/ke

Re: [patch v6 03/21] sched: only count runnable avg on cfs_rq's nr_running

2013-04-02 Thread Vincent Guittot
On 30 March 2013 15:34, Alex Shi wrote: > Old function count the runnable avg on rq's nr_running even there is > only rt task in rq. That is incorrect, so correct it to cfs_rq's > nr_running. > > Signed-off-by: Alex Shi > --- > kernel/sched/fair.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

Re: [patch v6 10/21] sched: get rq potential maximum utilization

2013-04-02 Thread Vincent Guittot
On 30 March 2013 15:34, Alex Shi wrote: > Since the rt task priority is higher than fair tasks, cfs_rq utilization > is just the left of rt utilization. > > When there are some cfs tasks in queue, the potential utilization may > be yielded, so mulitiplying cfs task number to get max potential > ut

[PATCH Resend v5] sched: fix init NOHZ_IDLE flag

2013-04-03 Thread Vincent Guittot
it was a side effect of the other use cases. Signed-off-by: Vincent Guittot --- include/linux/sched.h |6 +++ kernel/sched/core.c | 105 - kernel/sched/fair.c | 35 +++-- kernel/sched/sched.h | 24 +-- 4 files

[PATCH v4] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-04 Thread Vincent Guittot
ce Changes since V2: - remove useless definition for UP platform - rebased on top of Steven Rostedt's patches : https://lkml.org/lkml/2013/2/12/558 Changes since V1: - move code out of schedule function and create a pre_schedule callback for idle class instead. Signed-off-by: Vincent Guittot -

Re: [PATCH Resend v5] sched: fix init NOHZ_IDLE flag

2013-04-04 Thread Vincent Guittot
On 4 April 2013 19:07, Frederic Weisbecker wrote: > 2013/4/3 Vincent Guittot : >> On my smp platform which is made of 5 cores in 2 clusters, I have the >> nr_busy_cpu field of sched_group_power struct that is not null when the >> platform is fully idle. The root cause i

Re: [RFC PATCH v3 5/6] sched: pack the idle load balance

2013-04-05 Thread Vincent Guittot
:03 +0100, Vincent Guittot wrote: >> > But ha! here's your NO_HZ link.. but does the above DTRT and ensure >> > that the ILB is a little core when possible? >> >> The loop looks for an idle CPU as close as possible to the buddy CPU >> and the buddy CPU is the

[PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-01-29 Thread Vincent Guittot
: Vincent Guittot --- kernel/sched/core.c |1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 257002c..fd41924 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5884,6 +5884,7 @@ static void init_sched_groups_power(int cpu, struct

[PATCH v2 2/2] sched: fix update NOHZ_IDLE flag

2013-01-29 Thread Vincent Guittot
) first in order to detect such intialization step and to not modify the NOHZ_IDLE flag Signed-off-by: Vincent Guittot --- kernel/sched/fair.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5eea870..dac2edf 100644 --- a/kernel

[PATCH v2 0/2] sched: fix nr_busy_cpus

2013-01-29 Thread Vincent Guittot
an idle core use case as it was a side effect of the other use cases. Vincent Guittot (2): sched: fix init NOHZ_IDLE flag sched: fix update NOHZ_IDLE flag kernel/sched/core.c |1 + kernel/sched/fair.c |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) -- 1.7.9.5 -- To

Re: [PATCH Resend 1/3] sched: fix nr_busy_cpus with coupled cpuidle

2013-01-24 Thread Vincent Guittot
On 24 January 2013 17:44, Frederic Weisbecker wrote: > 2012/12/3 Vincent Guittot : >> With the coupled cpuidle driver (but probably also with other drivers), >> a CPU loops in a temporary safe state while waiting for other CPUs of its >> cluster to be ready to enter the coupl

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-26 Thread Vincent Guittot
On 26 February 2013 14:16, Frederic Weisbecker wrote: > 2013/2/22 Vincent Guittot : >> I wanted to avoid having to use the sd pointer for testing NOHZ_IDLE >> flag because it occurs each time we go into idle but it seems to be >> not easily feasible. >> Another

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-27 Thread Vincent Guittot
On 26 February 2013 18:43, Frederic Weisbecker wrote: > 2013/2/26 Vincent Guittot : >> On 26 February 2013 14:16, Frederic Weisbecker wrote: >>> 2013/2/22 Vincent Guittot : >>>> I wanted to avoid having to use the sd pointer for testing NOHZ_IDLE >>>> f

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-27 Thread Vincent Guittot
On 27 February 2013 17:13, Frederic Weisbecker wrote: > On Wed, Feb 27, 2013 at 09:28:26AM +0100, Vincent Guittot wrote: >> > Ok I don't like having a per cpu state in struct sched domain but for >> > now I can't find anything better. So my suggestion is that we do

Re: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-02-19 Thread Vincent Guittot
On 18 February 2013 16:40, Frederic Weisbecker wrote: > 2013/2/18 Vincent Guittot : >> On 18 February 2013 15:38, Frederic Weisbecker wrote: >>> I pasted the original at: http://pastebin.com/DMm5U8J8 >> >> We can clear the idle flag only in the nohz_kick_needed whic

Re: [PATCH v5 00/45] CPU hotplug: stop_machine()-free CPU hotplug

2013-02-19 Thread Vincent Guittot
On 18 February 2013 20:53, Steven Rostedt wrote: > On Mon, 2013-02-18 at 17:50 +0100, Vincent Guittot wrote: > >> yes for sure. >> The problem is more linked to cpuidle and function tracer. >> >> cpu hotplug and function tracer work when cpuidle is disable. >>

Re: [PATCH v2 1/2] sched: fix init NOHZ_IDLE flag

2013-02-19 Thread Vincent Guittot
On 19 February 2013 11:29, Vincent Guittot wrote: > On 18 February 2013 16:40, Frederic Weisbecker wrote: >> 2013/2/18 Vincent Guittot : >>> On 18 February 2013 15:38, Frederic Weisbecker wrote: >>>> I pasted the original at: http://pastebin.com/DMm5U8J8 >>&

[PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-21 Thread Vincent Guittot
build of the sched_domain will not corrupt the initialization state Change since V1: - remove the patch for SCHED softirq on an idle core use case as it was a side effect of the other use cases. Signed-off-by: Vincent Guittot --- kernel/sched/core.c |4 +++- kernel/sched/fair.c |9

Re: [PATCH v4] sched: fix init NOHZ_IDLE flag

2013-02-22 Thread Vincent Guittot
On 22 February 2013 13:32, Frederic Weisbecker wrote: > On Thu, Feb 21, 2013 at 09:29:16AM +0100, Vincent Guittot wrote: >> On my smp platform which is made of 5 cores in 2 clusters, I have the >> nr_busy_cpu field of sched_group_power struct that is not null when the >> p

Re: [PATCH] topology: removed kzalloc return value cast

2013-03-13 Thread Vincent Guittot
_capacity *)kzalloc(alloc_size, GFP_NOWAIT); > + cpu_capacity = kzalloc(alloc_size, GFP_NOWAIT); you're right Acked-by: Vincent Guittot > > while ((cn = of_find_node_by_type(cn, "cpu"))) { > const u32 *rate, *reg; > -- > 1.7.10.4 > --

[RFC] sched: nohz_idle_balance

2012-09-12 Thread Vincent Guittot
On tickless system, one CPU runs load balance for all idle CPUs. The cpu_load of this CPU is updated before starting the load balance of each other idle CPUs. We should instead update the cpu_load of the balance_cpu. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 11 ++- 1

Re: [RFC] sched: nohz_idle_balance

2012-09-13 Thread Vincent Guittot
Wrong button make me removed others guys from the thread. Sorry for this mistake. On 13 September 2012 09:56, Mike Galbraith wrote: > On Thu, 2012-09-13 at 09:44 +0200, Vincent Guittot wrote: >> On 13 September 2012 09:29, Mike Galbraith wrote: >> > On Thu, 2012-09-13 at 08

Re: [PATCH v4 0/5] ARM: topology: set the capacity of each cores for big.LITTLE

2012-09-13 Thread Vincent Guittot
On 10 July 2012 15:42, Peter Zijlstra wrote: > On Tue, 2012-07-10 at 14:35 +0200, Vincent Guittot wrote: >> >> May be the last one which enable ARCH_POWER should also go into tip ? >> > OK, I can take it. Hi Peter, I can't find the patch that enable ARCH_POWER in t

Re: [PATCH v4 0/5] ARM: topology: set the capacity of each cores for big.LITTLE

2012-09-13 Thread Vincent Guittot
On 13 September 2012 14:07, Peter Zijlstra wrote: > On Thu, 2012-09-13 at 11:17 +0200, Vincent Guittot wrote: >> On 10 July 2012 15:42, Peter Zijlstra wrote: >> > On Tue, 2012-07-10 at 14:35 +0200, Vincent Guittot wrote: >> >> >> >> May be the last one w

Re: [PATCH 3/3] workqueue: Schedule work on non-idle cpu instead of current one

2012-09-25 Thread Vincent Guittot
On 25 September 2012 13:30, Viresh Kumar wrote: > On 25 September 2012 16:52, Peter Zijlstra wrote: >> On Tue, 2012-09-25 at 16:06 +0530, Viresh Kumar wrote: >>> @@ -1066,8 +1076,9 @@ int queue_work(struct workqueue_struct *wq, >>> struct work_struct *work) >>> { >>> int ret; >>> >>> -

Re: [RFC 2/6] sched: add a new SD SHARE_POWERLINE flag for sched_domain

2012-10-29 Thread Vincent Guittot
On 24 October 2012 17:17, Santosh Shilimkar wrote: > Vincent, > > Few comments/questions. > > > On Sunday 07 October 2012 01:13 PM, Vincent Guittot wrote: >> >> This new flag SD SHARE_POWERLINE reflects the sharing of the power rail >> between the members

Re: [RFC 2/6] sched: add a new SD SHARE_POWERLINE flag for sched_domain

2012-10-29 Thread Vincent Guittot
It looks like i need to describe more what On 29 October 2012 10:40, Vincent Guittot wrote: > On 24 October 2012 17:17, Santosh Shilimkar wrote: >> Vincent, >> >> Few comments/questions. >> >> >> On Sunday 07 October 2012 01:13 PM, Vincent

Re: [RFC 3/6] sched: pack small tasks

2012-10-29 Thread Vincent Guittot
On 24 October 2012 17:20, Santosh Shilimkar wrote: > Vincent, > > Few comments/questions. > > > On Sunday 07 October 2012 01:13 PM, Vincent Guittot wrote: >> >> During sched_domain creation, we define a pack buddy CPU if available. >> >> On a system

Re: [RFC 4/6] sched: secure access to other CPU statistics

2012-10-29 Thread Vincent Guittot
On 24 October 2012 17:21, Santosh Shilimkar wrote: > $subject is bit confusing here. > > > On Sunday 07 October 2012 01:13 PM, Vincent Guittot wrote: >> >> The atomic update of runnable_avg_sum and runnable_avg_period are ensured >> by their size and the toolchain.

Re: [RFC 5/6] sched: pack the idle load balance

2012-10-29 Thread Vincent Guittot
On 24 October 2012 17:21, Santosh Shilimkar wrote: > On Sunday 07 October 2012 01:13 PM, Vincent Guittot wrote: >> >> Look for an idle CPU close the pack buddy CPU whenever possible. > > s/close/close to yes > >> The goal is to prevent the wake up of a CPU which d

Re: [RFC 6/6] ARM: sched: clear SD_SHARE_POWERLINE

2012-10-29 Thread Vincent Guittot
On 24 October 2012 17:21, Santosh Shilimkar wrote: > On Sunday 07 October 2012 01:13 PM, Vincent Guittot wrote: >> >> The ARM platforms take advantage of packing small tasks on few cores. >> This is true even when the cores of a cluster can't be powergated >> indep

Re: [RFC][PATCH 1/9] sched: Introduce power scheduler

2013-07-10 Thread Vincent Guittot
On 10 July 2013 13:11, Morten Rasmussen wrote: > On Wed, Jul 10, 2013 at 03:10:15AM +0100, Arjan van de Ven wrote: >> On 7/9/2013 8:55 AM, Morten Rasmussen wrote: >> > + mod_delayed_work_on(schedule_cpu(), system_wq, &dwork, >> > + msecs_to_jiffies(INTERVAL)); >> >> so

Re: [RFC][PATCH 14/10] sched, fair: Fix the group_capacity computation

2013-09-04 Thread Vincent Guittot
city to the actual number of cores. > Peter, your patch also solves the 'phantom' big cores that can appear on HMP system because big cores have a cpu_power >= SCHED_POWER_SCALE in order to express a higher capacity than LITTLE cores. Acked-by Vincent Guittot Vincent > The ass

[RFC 0/6] sched: packing small tasks

2012-10-07 Thread Vincent Guittot
for a default kernel: | CA7 | CA7 | total | - default | 40 | 40 | 80 | --------- Vincent Guittot (6): Revert "sched: introduce temporary FAIR_GROUP_SCHED dependency for load-tracking" sched: add

[PATCH Resend 1/3] sched: fix nr_busy_cpus with coupled cpuidle

2012-12-03 Thread Vincent Guittot
: Vincent Guittot --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 955d35b..b8d74ea 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -570,6 +570,8 @@ void tick_nohz_irq_exit(void

[PATCH Resend 3/3] sched: fix update NOHZ_IDLE flag

2012-12-03 Thread Vincent Guittot
detect such intialization step and to not modify the NOHZ_IDLE flag Signed-off-by: Vincent Guittot --- kernel/sched/fair.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 24a5588..1ef57a8 100644 --- a/kernel/sched/fair.c +++ b

[PATCH Resend 2/3] sched: fix init NOHZ_IDLE flag

2012-12-03 Thread Vincent Guittot
: Vincent Guittot --- kernel/sched/core.c |1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bae620a..77a01c8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5875,6 +5875,7 @@ static void init_sched_groups_power(int cpu, struct

[PATCH Resend 0/3] sched: fix nr_busy_cpus

2012-12-03 Thread Vincent Guittot
enter idle state while booting all CPUs - when a CPU is unplug and/or replug Vincent Guittot (3): sched: fix nr_busy_cpus with coupled cpuidle sched: fix init NOHZ_IDLE flag sched: fix update NOHZ_IDLE flag kernel/sched/core.c |1 + kernel/sched/fair.c |2 +- kernel/time

Re: [patch 15/16] sched: implement usage tracking

2012-10-19 Thread Vincent Guittot
Hi Paul, I think that you have forgot to reset .usage_avg_sum in the __sched_fork as it's already done for .runnable_avg_sum and .usage_avg_sum And it seems that this reset is not corrected in the latest version in your git repo: http://git.kernel.org/?p=linux/kernel/git/pjt/sched.git;a=blob;f=ke

Re: [RFC 6/6] ARM: sched: clear SD_SHARE_POWERLINE

2012-11-12 Thread Vincent Guittot
On 2 November 2012 12:00, Santosh Shilimkar wrote: > On Monday 29 October 2012 06:58 PM, Vincent Guittot wrote: >> >> On 24 October 2012 17:21, Santosh Shilimkar >> wrote: >>> >>> On Sunday 07 October 2012 01:13 PM, Vincent Guittot wrote: >>>

Re: [RFC 3/6] sched: pack small tasks

2012-11-12 Thread Vincent Guittot
On 2 November 2012 11:53, Santosh Shilimkar wrote: > On Monday 29 October 2012 06:42 PM, Vincent Guittot wrote: >> >> On 24 October 2012 17:20, Santosh Shilimkar >> wrote: >>> >>> Vincent, >>> >>> Few comments/questions. >>>

Re: [RFC 3/6] sched: pack small tasks

2012-11-12 Thread Vincent Guittot
On 9 November 2012 17:46, Morten Rasmussen wrote: > On Fri, Nov 02, 2012 at 10:53:47AM +, Santosh Shilimkar wrote: >> On Monday 29 October 2012 06:42 PM, Vincent Guittot wrote: >> > On 24 October 2012 17:20, Santosh Shilimkar >> > wrote: >> >> Vinc

Re: [RFC 3/6] sched: pack small tasks

2012-11-12 Thread Vincent Guittot
Oct 07, 2012 at 08:43:55AM +0100, Vincent Guittot wrote: >> During sched_domain creation, we define a pack buddy CPU if available. >> >> On a system that share the powerline at all level, the buddy is set to -1 >> >> On a dual clusters / dual cores system which can powergate

Re: [RFC PATCH v2 3/6] sched: pack small tasks

2012-12-18 Thread Vincent Guittot
On 17 December 2012 16:24, Alex Shi wrote: >>> The scheme below tries to summaries the idea: >>> >>> Socket | socket 0 | socket 1 | socket 2 | socket 3 | >>> LCPU| 0 | 1-15 | 16 | 17-31 | 32 | 33-47 | 48 | 49-63 | >>> buddy conf0 | 0 | 0| 1 | 16| 2

Re: [RFC PATCH v2 3/6] sched: pack small tasks

2012-12-21 Thread Vincent Guittot
On 21 December 2012 06:47, Namhyung Kim wrote: > Hi Vincent, > > On Thu, Dec 13, 2012 at 11:11:11AM +0100, Vincent Guittot wrote: >> On 13 December 2012 03:17, Alex Shi wrote: >> > On 12/12/2012 09:31 PM, Vincent Guittot wrote: >> >>

Re: [RFC PATCH v2 3/6] sched: pack small tasks

2012-12-21 Thread Vincent Guittot
On 21 December 2012 09:53, Vincent Guittot wrote: > On 21 December 2012 06:47, Namhyung Kim wrote: >> Hi Vincent, >> >> On Thu, Dec 13, 2012 at 11:11:11AM +0100, Vincent Guittot wrote: >>> On 13 December 2012 03:17, Alex Shi wrote: >>> > On

Re: [RFC v2 PATCH 2/2] sched: Use Per-Entity-Load-Tracking metric for load balancing

2012-11-15 Thread Vincent Guittot
Hi Preeti, On 15 November 2012 17:54, Preeti U Murthy wrote: > Currently the load balancer weighs a task based upon its priority,and this > weight consequently gets added up to the weight of the run queue that it is > on.It is this weight of the runqueue that sums up to a sched group's load > whi

[RFC 3/3] sched: fix update NOHZ_IDLE flag

2012-11-19 Thread Vincent Guittot
detect such intialization step and to not modify the NOHZ_IDLE flag Signed-off-by: Vincent Guittot --- kernel/sched/fair.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3d0686c..1bf7c87 100644 --- a/kernel/sched/fair.c +++ b

[RFC 0/3] sched: fix nr_busy_cpus

2012-11-19 Thread Vincent Guittot
enter idle state while booting all CPUs - when a CPU is unplug and/or replug Vincent Guittot (3): sched: fix nr_busy_cpus with coupled cpuidle sched: fix init NOHZ_IDLE flag sched: fix update NOHZ_IDLE flag kernel/sched/core.c |1 + kernel/sched/fair.c |2 +- kernel/time

[RFC 1/3] sched: fix nr_busy_cpus with coupled cpuidle

2012-11-19 Thread Vincent Guittot
: Vincent Guittot --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index a402608..e19bbc9 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -526,6 +526,8 @@ void tick_nohz_irq_exit(void

[RFC 2/3] sched: fix init NOHZ_IDLE flag

2012-11-19 Thread Vincent Guittot
: Vincent Guittot --- kernel/sched/core.c |1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 5dae0d2..05058e8 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5817,6 +5817,7 @@ static void init_sched_groups_power(int cpu, struct

Re: [RFC 3/6] sched: pack small tasks

2012-11-20 Thread Vincent Guittot
On 20 November 2012 15:28, Morten Rasmussen wrote: > Hi Vincent, > > On Mon, Nov 12, 2012 at 01:51:00PM +, Vincent Guittot wrote: >> On 9 November 2012 18:13, Morten Rasmussen wrote: >> > Hi Vincent, >> > >> > I have experienced suboptimal buddy s

[PATCH Resend v6] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-18 Thread Vincent Guittot
r UP platform - rebased on top of Steven Rostedt's patches : https://lkml.org/lkml/2013/2/12/558 Changes since V1: - move code out of schedule function and create a pre_schedule callback for idle class instead. Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 23 +++

Re: [PATCH Resend v6] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-19 Thread Vincent Guittot
On 19 April 2013 06:30, Mike Galbraith wrote: > On Thu, 2013-04-18 at 18:34 +0200, Vincent Guittot wrote: >> The current update of the rq's load can be erroneous when RT tasks are >> involved >> >> The update of the load of a rq that becomes idle, is done only if

Re: [PATCH Resend v6] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-19 Thread Vincent Guittot
On 19 April 2013 10:14, Mike Galbraith wrote: > On Fri, 2013-04-19 at 09:49 +0200, Vincent Guittot wrote: >> On 19 April 2013 06:30, Mike Galbraith wrote: >> > On Thu, 2013-04-18 at 18:34 +0200, Vincent Guittot wrote: >> >> The current update of the rq's load

Re: [PATCH Resend v6] sched: fix wrong rq's runnable_avg update with rt tasks

2013-04-19 Thread Vincent Guittot
On 19 April 2013 11:21, Mike Galbraith wrote: > On Fri, 2013-04-19 at 10:50 +0200, Vincent Guittot wrote: >> On 19 April 2013 10:14, Mike Galbraith wrote: >> > On Fri, 2013-04-19 at 09:49 +0200, Vincent Guittot wrote: >> >> On 19 April 2013 06:30, Mike Galbraith

[PATCH v6] sched: fix init NOHZ_IDLE flag

2013-04-19 Thread Vincent Guittot
the build of the sched_domain will not corrupt the initialization state Change since V1: - remove the patch for SCHED softirq on an idle core use case as it was a side effect of the other use cases. Signed-off-by: Vincent Guittot --- include/linux/sched.h | 12 ++ kernel/sched/core.c

Re: [PATCH v6] sched: fix init NOHZ_IDLE flag

2013-04-22 Thread Vincent Guittot
On 22 April 2013 11:30, Peter Zijlstra wrote: > On Fri, 2013-04-19 at 15:10 +0200, Vincent Guittot wrote: >> As suggested by Frederic Weisbecker, another solution is to have the >> same >> rcu lifecycle for both NOHZ_IDLE and sched_domain struct. I have >> introdu

Re: [PATCH v6] sched: fix init NOHZ_IDLE flag

2013-04-22 Thread Vincent Guittot
On 22 April 2013 13:39, Peter Zijlstra wrote: > On Mon, 2013-04-22 at 13:01 +0200, Vincent Guittot wrote: >> > I'm not quite getting things.. what's wrong with adding this flags >> > thing to sched_domain itself? That's already RCU destroyed so why >>

[PATCH v7] sched: fix init NOHZ_IDLE flag

2013-04-22 Thread Vincent Guittot
-by: Vincent Guittot --- include/linux/sched.h |1 + kernel/sched/fair.c | 34 -- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index d35d2b6..cde4f7f 100644 --- a/include/linux/sched.h +++ b

Re: [PATCH v7] sched: fix init NOHZ_IDLE flag

2013-04-23 Thread Vincent Guittot
On 22 April 2013 22:10, Peter Zijlstra wrote: > On Mon, 2013-04-22 at 17:38 +0200, Vincent Guittot wrote: > >> --- >> include/linux/sched.h |1 + >> kernel/sched/fair.c | 34 -- >> 2 files changed, 25 insertions(+), 10 d

Re: [PATCH v7] sched: fix init NOHZ_IDLE flag

2013-04-23 Thread Vincent Guittot
On 23 April 2013 10:50, Peter Zijlstra wrote: > On Tue, 2013-04-23 at 09:52 +0200, Vincent Guittot wrote: > >> > static inline unsigned long *rq_nohz_flags(int cpu) >> > { >> > return rcu_dereference(cpu_rq(cpu)->sd)->nohz_flags; >> > } >

[PATCH v8] sched: fix init NOHZ_IDLE flag

2013-04-23 Thread Vincent Guittot
-by: Vincent Guittot --- include/linux/sched.h |3 +++ kernel/sched/fair.c | 26 -- kernel/sched/sched.h |1 - 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index d35d2b6..22bcbe8 100644 --- a

Re: [RFC patch 1/4] sched: change cfs_rq load avg to unsigned long

2013-06-17 Thread Vincent Guittot
On 8 June 2013 04:18, Alex Shi wrote: > On 06/07/2013 05:07 PM, Vincent Guittot wrote: >> On 7 June 2013 09:29, Alex Shi wrote: >>> > Since the 'u64 runnable_load_avg, blocked_load_avg' in cfs_rq struct are >>> > smaller than 'unsigned long'

Re: [PATCH] sched: fix clear NOHZ_BALANCE_KICK

2013-06-04 Thread Vincent Guittot
On 4 June 2013 00:48, Frederic Weisbecker wrote: > On Thu, May 30, 2013 at 05:23:05PM +0200, Vincent Guittot wrote: >> I have faced a sequence where the Idle Load Balance was sometime not >> triggered for a while on my platform. >> >> CPU 0 and CPU 1 are running tasks

Re: [PATCH] sched: fix clear NOHZ_BALANCE_KICK

2013-06-04 Thread Vincent Guittot
On 4 June 2013 12:26, Frederic Weisbecker wrote: > On Tue, Jun 04, 2013 at 11:36:11AM +0200, Peter Zijlstra wrote: >> >> The best I can seem to come up with is something like the below; but I think >> its ghastly. Surely we can do something saner with that bit. >> >> Having to clear it at 3 differ

Re: [PATCH] sched: fix clear NOHZ_BALANCE_KICK

2013-06-04 Thread Vincent Guittot
On 4 June 2013 13:19, Frederic Weisbecker wrote: > On Tue, Jun 04, 2013 at 01:11:47PM +0200, Vincent Guittot wrote: >> On 4 June 2013 12:26, Frederic Weisbecker wrote: >> > On Tue, Jun 04, 2013 at 11:36:11AM +0200, Peter Zijlstra wrote: >> >> >> >&

Re: [PATCH] sched: fix clear NOHZ_BALANCE_KICK

2013-06-04 Thread Vincent Guittot
On 4 June 2013 16:44, Frederic Weisbecker wrote: > On Tue, Jun 04, 2013 at 01:48:47PM +0200, Vincent Guittot wrote: >> On 4 June 2013 13:19, Frederic Weisbecker wrote: >> > On Tue, Jun 04, 2013 at 01:11:47PM +0200, Vincent Guittot wrote: >> >> On 4 June 2013 12:

[PATCH v2] sched: fix clear NOHZ_BALANCE_KICK

2013-06-05 Thread Vincent Guittot
solution clears NOHZ_BALANCE_KICK in schedule_ipi if we can't raise the sched_softirq for the Idle Load Balance. Change since V1: - move the clear of NOHZ_BALANCE_KICK in got_nohz_idle_kick if the ILB can't run on this CPU (as suggested by Peter) Signed-off-by: Vincent Guittot --- kernel/sc

Re: [RFC patch 1/4] sched: change cfs_rq load avg to unsigned long

2013-06-07 Thread Vincent Guittot
On 7 June 2013 09:29, Alex Shi wrote: > Since the 'u64 runnable_load_avg, blocked_load_avg' in cfs_rq struct are > smaller than 'unsigned long' cfs_rq->load.weight. We don't need u64 > vaiables to describe them. unsigned long is more efficient and convenience. > Hi Alex, I just want to point out

Re: [Resend patch v8 06/13] sched: compute runnable load avg in cpu_load and cpu_avg_load_per_task

2013-06-20 Thread Vincent Guittot
On 20 June 2013 04:18, Alex Shi wrote: > They are the base values in load balance, update them with rq runnable > load average, then the load balance will consider runnable load avg > naturally. > > We also try to include the blocked_load_avg as cpu load in balancing, > but that cause kbuild perfo

[PATCH] sched: fix clear NOHZ_BALANCE_KICK

2013-05-30 Thread Vincent Guittot
back to a normal situation. The proposed solution clears NOHZ_BALANCE_KICK in schedule_ipi if we can't raise the sched_softirq for the Idle Load Balance. Signed-off-by: Vincent Guittot --- kernel/sched/core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/

Re: [Resend patch v8 06/13] sched: compute runnable load avg in cpu_load and cpu_avg_load_per_task

2013-06-24 Thread Vincent Guittot
On 24 June 2013 11:06, Alex Shi wrote: > On 06/20/2013 10:18 AM, Alex Shi wrote: >> They are the base values in load balance, update them with rq runnable >> load average, then the load balance will consider runnable load avg >> naturally. >> >> We also try to include the blocked_load_avg as cpu l

[RFC PATCH v3 0/6] sched: packing small tasks

2013-03-22 Thread Vincent Guittot
| CA7 | CA7 | total | - default | 40 | 40 | 80 | --------- Vincent Guittot (6): Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking" sched: add a new SD_SHARE_POWERD

[RFC PATCH v3 3/6] sched: pack small tasks

2013-03-22 Thread Vincent Guittot
CPU3 | --- buddy | CPU0 | CPU0 | CPU0 | CPU2 | Small tasks tend to slip out of the periodic load balance so the best place to choose to migrate them is during their wake up. The decision is in O(1) as we only check again one buddy CPU Signed-off-by: Vincent Guittot Reviewed-by: Morten Rasm

[RFC PATCH v3 5/6] sched: pack the idle load balance

2013-03-22 Thread Vincent Guittot
Look for an idle CPU close to the pack buddy CPU whenever possible. The goal is to prevent the wake up of a CPU which doesn't share the power domain of the pack buddy CPU. Signed-off-by: Vincent Guittot Reviewed-by: Morten Rasmussen --- kernel/sched/fair.c | 18 ++ 1

[RFC PATCH v3 6/6] ARM: sched: clear SD_SHARE_POWERDOMAIN

2013-03-22 Thread Vincent Guittot
The ARM platforms take advantage of packing small tasks on few cores. This is true even when the cores of a cluster can't be power gated independantly. So we clear SD_SHARE_POWERDOMAIN at MC and CPU level. Signed-off-by: Vincent Guittot Reviewed-by: Morten Rasmussen --- arch/arm/k

[RFC PATCH v3 1/6] Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for load-tracking"

2013-03-22 Thread Vincent Guittot
This reverts commit f4e26b120b9de84cb627bc7361ba43cfdc51341f. Signed-off-by: Vincent Guittot --- include/linux/sched.h |8 +--- kernel/sched/core.c |7 +-- kernel/sched/fair.c | 13 ++--- kernel/sched/sched.h |9 + 4 files changed, 5 insertions(+), 32

[RFC PATCH v3 4/6] sched: secure access to other CPU statistics

2013-03-22 Thread Vincent Guittot
45ms after plugging a CPU, which implies that we could use the max value instead of reading runnable_avg_period after 345ms. During the starting phase, we must ensure a minimum of coherency between the fields. A simple rule is runnable_avg_sum <= runnable_avg_period. Signed-off-by: Vincent Guittot

[RFC PATCH v3 2/6] sched: add a new SD_SHARE_POWERDOMAIN flag for sched_domain

2013-03-22 Thread Vincent Guittot
x27;s worth packing some tasks in a group of CPUs in order to power gated the other groups instead of spreading the tasks. The default behavior of the scheduler is to spread tasks so the flag is set into all sched_domains. Signed-off-by: Vincent Guittot Reviewed-by: Morten Rasmussen --- arch/ia64/in

Re: [RFC PATCH v3 0/6] sched: packing small tasks

2013-03-25 Thread Vincent Guittot
ect a policy. So, you're right that we should find a way to have both working together and still keep these specificities. Regards, Vincent > > Thanks > > Regards > Preeti U Murthy > > On 03/22/2013 05:55 PM, Vincent Guittot wrote: >> Hi, >> >> This patchset takes ad

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:37, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> +static bool is_light_task(struct task_struct *p) >> +{ >> + /* A light task runs less than 20% in average */ >> + return ((p-&g

Re: [RFC PATCH v3 4/6] sched: secure access to other CPU statistics

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:50, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> @@ -3364,13 +3364,16 @@ done: >> static bool is_buddy_busy(int cpu) >> { >> struct rq *rq = cpu_rq(cpu); >> + u32 sum = rq->avg.runnable

Re: [RFC PATCH v3 3/6] sched: pack small tasks

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:46, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> During the creation of sched_domain, we define a pack buddy CPU for >> each CPU >> when one is available. We want to pack at all levels where a group of >>

Re: [RFC PATCH v3 5/6] sched: pack the idle load balance

2013-03-26 Thread Vincent Guittot
On 26 March 2013 13:52, Peter Zijlstra wrote: > On Fri, 2013-03-22 at 13:25 +0100, Vincent Guittot wrote: >> Look for an idle CPU close to the pack buddy CPU whenever possible. >> The goal is to prevent the wake up of a CPU which doesn't share the >> power >&

  1   2   3   4   5   6   7   8   9   10   >