Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-06 Thread Wanpeng Li
On 14/11/6 下午6:08, Peter Zijlstra wrote: On Thu, Nov 06, 2014 at 09:46:34AM +0800, Wanpeng Li wrote: Ah, it could be that for offline cpus we have a singleton rd. Lemme try I still cannot find where build the singleton rd in the codes, could you point out? So this is all quite horrible

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-06 Thread Peter Zijlstra
On Thu, Nov 06, 2014 at 09:46:34AM +0800, Wanpeng Li wrote: > >Ah, it could be that for offline cpus we have a singleton rd. Lemme try > > I still cannot find where build the singleton rd in the codes, could you > point out? So this is all quite horrible code, but what I think happens is that:

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-06 Thread Peter Zijlstra
On Thu, Nov 06, 2014 at 09:46:34AM +0800, Wanpeng Li wrote: Ah, it could be that for offline cpus we have a singleton rd. Lemme try I still cannot find where build the singleton rd in the codes, could you point out? So this is all quite horrible code, but what I think happens is that:

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-06 Thread Wanpeng Li
On 14/11/6 下午6:08, Peter Zijlstra wrote: On Thu, Nov 06, 2014 at 09:46:34AM +0800, Wanpeng Li wrote: Ah, it could be that for offline cpus we have a singleton rd. Lemme try I still cannot find where build the singleton rd in the codes, could you point out? So this is all quite horrible

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
Hi Peter, On Wed, Nov 05, 2014 at 01:52:54PM +0100, Peter Zijlstra wrote: >On Wed, Nov 05, 2014 at 06:59:35PM +0800, Wanpeng Li wrote: >> Hi Peter, >> On 14/11/5 下午6:50, Peter Zijlstra wrote: >> >On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: >> >>Note: dl task can be migrated

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Peter Zijlstra
On Wed, Nov 05, 2014 at 04:14:00PM +0300, Kirill Tkhai wrote: > > @@ -538,6 +539,39 @@ again: > > update_rq_clock(rq); > > dl_se->dl_throttled = 0; > > dl_se->dl_yielded = 0; > > + > > + /* > > +* So if we find that the rq the task was on is no longer > > +* available, we

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Kirill Tkhai
Hi, all, В Ср, 05/11/2014 в 16:51 +0800, Wanpeng Li пишет: > I observe that dl task can't be migrated to other cpus during cpu hotplug, in > addition, task may/may not be running again if cpu is added back. The root > cause > which I found is that dl task will be throtted and removed from dl rq

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Peter Zijlstra
On Wed, Nov 05, 2014 at 06:59:35PM +0800, Wanpeng Li wrote: > Hi Peter, > On 14/11/5 下午6:50, Peter Zijlstra wrote: > >On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: > >>Note: dl task can be migrated successfully if rq is offline currently, > >>however, > >>I'm still not sure why

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
Hi Peter, On 14/11/5 下午6:50, Peter Zijlstra wrote: On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: Note: dl task can be migrated successfully if rq is offline currently, however, I'm still not sure why task_rq(task)->rd->span just include the cpu which the dl task previous running

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Peter Zijlstra
On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: > Note: dl task can be migrated successfully if rq is offline currently, > however, > I'm still not sure why task_rq(task)->rd->span just include the cpu which the > dl > task previous running on, so cpu_active_mask is used in the

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
Hi Juri, On 14/11/5 下午6:08, Juri Lelli wrote: Hi, On 05/11/14 08:51, Wanpeng Li wrote: I observe that dl task can't be migrated to other cpus during cpu hotplug, in addition, task may/may not be running again if cpu is added back. The root cause which I found is that dl task will be throtted

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Juri Lelli
Hi, On 05/11/14 08:51, Wanpeng Li wrote: > I observe that dl task can't be migrated to other cpus during cpu hotplug, in > addition, task may/may not be running again if cpu is added back. The root > cause > which I found is that dl task will be throtted and removed from dl rq after > comsuming

[RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
I observe that dl task can't be migrated to other cpus during cpu hotplug, in addition, task may/may not be running again if cpu is added back. The root cause which I found is that dl task will be throtted and removed from dl rq after comsuming all budget, which leads to stop task can't pick it up

[RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
I observe that dl task can't be migrated to other cpus during cpu hotplug, in addition, task may/may not be running again if cpu is added back. The root cause which I found is that dl task will be throtted and removed from dl rq after comsuming all budget, which leads to stop task can't pick it up

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Juri Lelli
Hi, On 05/11/14 08:51, Wanpeng Li wrote: I observe that dl task can't be migrated to other cpus during cpu hotplug, in addition, task may/may not be running again if cpu is added back. The root cause which I found is that dl task will be throtted and removed from dl rq after comsuming all

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
Hi Juri, On 14/11/5 下午6:08, Juri Lelli wrote: Hi, On 05/11/14 08:51, Wanpeng Li wrote: I observe that dl task can't be migrated to other cpus during cpu hotplug, in addition, task may/may not be running again if cpu is added back. The root cause which I found is that dl task will be throtted

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Peter Zijlstra
On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: Note: dl task can be migrated successfully if rq is offline currently, however, I'm still not sure why task_rq(task)-rd-span just include the cpu which the dl task previous running on, so cpu_active_mask is used in the patch.

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
Hi Peter, On 14/11/5 下午6:50, Peter Zijlstra wrote: On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: Note: dl task can be migrated successfully if rq is offline currently, however, I'm still not sure why task_rq(task)-rd-span just include the cpu which the dl task previous running on,

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Peter Zijlstra
On Wed, Nov 05, 2014 at 06:59:35PM +0800, Wanpeng Li wrote: Hi Peter, On 14/11/5 下午6:50, Peter Zijlstra wrote: On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: Note: dl task can be migrated successfully if rq is offline currently, however, I'm still not sure why

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Kirill Tkhai
Hi, all, В Ср, 05/11/2014 в 16:51 +0800, Wanpeng Li пишет: I observe that dl task can't be migrated to other cpus during cpu hotplug, in addition, task may/may not be running again if cpu is added back. The root cause which I found is that dl task will be throtted and removed from dl rq

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Peter Zijlstra
On Wed, Nov 05, 2014 at 04:14:00PM +0300, Kirill Tkhai wrote: @@ -538,6 +539,39 @@ again: update_rq_clock(rq); dl_se-dl_throttled = 0; dl_se-dl_yielded = 0; + + /* +* So if we find that the rq the task was on is no longer +* available, we need to select a new

Re: [RFC PATCH v2] sched/deadline: support dl task migration during cpu hotplug

2014-11-05 Thread Wanpeng Li
Hi Peter, On Wed, Nov 05, 2014 at 01:52:54PM +0100, Peter Zijlstra wrote: On Wed, Nov 05, 2014 at 06:59:35PM +0800, Wanpeng Li wrote: Hi Peter, On 14/11/5 下午6:50, Peter Zijlstra wrote: On Wed, Nov 05, 2014 at 04:51:57PM +0800, Wanpeng Li wrote: Note: dl task can be migrated successfully if rq