Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-18 Thread Vincent Guittot
On 18 November 2014 11:47, Wanpeng Li wrote: > Hi Vincent, > On 10/31/14, 4:47 PM, Vincent Guittot wrote: >> >> When a CPU is used to handle a lot of IRQs or some RT tasks, the remaining >> capacity for CFS tasks can be significantly reduced. Once we detect such > > > I see the cpu capacity will b

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-18 Thread Wanpeng Li
Hi Vincent, On 10/31/14, 4:47 PM, Vincent Guittot wrote: When a CPU is used to handle a lot of IRQs or some RT tasks, the remaining capacity for CFS tasks can be significantly reduced. Once we detect such I see the cpu capacity will be reduced if RT tasks are running in scale_rt_capacity(), co

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Vincent Guittot
On 4 November 2014 14:31, Hillf Danton wrote: >> >> > I wonder if you can please shed light on the case that >> >> > the dst_cpu is newly idle. >> >> >> >> The main problem if we do the test only for newly idle case, is that >> >> we are not sure to move the task because we must rely on the >> >>

RE: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Hillf Danton
> >> > I wonder if you can please shed light on the case that > >> > the dst_cpu is newly idle. > >> > >> The main problem if we do the test only for newly idle case, is that > >> we are not sure to move the task because we must rely on the > >> wakeup/sleep sequence of other tasks on an idle CPU i

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Vincent Guittot
On 4 November 2014 13:54, Hillf Danton wrote: >> >> On 4 November 2014 13:07, Hillf Danton wrote: >> >> >> + /* >> >> >> +* The dst_cpu is idle and the src_cpu CPU has only 1 CFS task. >> >> > >> >> > >> >> > Why specify one task instead of not less than one? >> >> >> >> if cfs.h_nr

RE: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Hillf Danton
> > On 4 November 2014 13:07, Hillf Danton wrote: > >> >> + /* > >> >> +* The dst_cpu is idle and the src_cpu CPU has only 1 CFS task. > >> > > >> > > >> > Why specify one task instead of not less than one? > >> > >> if cfs.h_nr_running = 0 (which should not occurs at that point), w

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Vincent Guittot
On 4 November 2014 13:07, Hillf Danton wrote: >> >> + /* >> >> +* The dst_cpu is idle and the src_cpu CPU has only 1 CFS task. >> > >> > >> > Why specify one task instead of not less than one? >> >> if cfs.h_nr_running = 0 (which should not occurs at that point), we >> don't need to

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Hillf Danton
> >> + /* > >> +* The dst_cpu is idle and the src_cpu CPU has only 1 CFS task. > > > > > > Why specify one task instead of not less than one? > > if cfs.h_nr_running = 0 (which should not occurs at that point), we > don't need to do more test to check if it's worth moving the task >

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Vincent Guittot
On 4 November 2014 11:42, Wanpeng Li wrote: > Hi Vincent, > + +/* * Group imbalance indicates (and tries to solve) the problem where balancing * groups is inadequate due to tsk_cpus_allowed() constraints. * @@ -6562,6 +6574,28 @@ static int need_activ

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Wanpeng Li
Hi Vincent, On 14/11/4 下午5:41, Vincent Guittot wrote: On 4 November 2014 09:30, Wanpeng Li wrote: On 14/10/31 下午4:47, Vincent Guittot wrote: When a CPU is used to handle a lot of IRQs or some RT tasks, the remaining capacity for CFS tasks can be significantly reduced. Once we detect such situa

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Vincent Guittot
On 4 November 2014 09:30, Wanpeng Li wrote: > > On 14/10/31 下午4:47, Vincent Guittot wrote: >> >> When a CPU is used to handle a lot of IRQs or some RT tasks, the remaining >> capacity for CFS tasks can be significantly reduced. Once we detect such >> situation by comparing cpu_capacity_orig and cp

Re: [PATCH v8 03/10] sched: move cfs task on a CPU with higher capacity

2014-11-04 Thread Wanpeng Li
On 14/10/31 下午4:47, Vincent Guittot wrote: When a CPU is used to handle a lot of IRQs or some RT tasks, the remaining capacity for CFS tasks can be significantly reduced. Once we detect such situation by comparing cpu_capacity_orig and cpu_capacity, we trig an idle load balance to check if it's