Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-22 Thread Morten Rasmussen
On Mon, Aug 22, 2016 at 09:48:19AM +0800, Wanpeng Li wrote: > 2016-08-19 22:03 GMT+08:00 Morten Rasmussen : > > On Fri, Aug 19, 2016 at 09:43:00AM +0800, Wanpeng Li wrote: > >> 2016-08-18 21:45 GMT+08:00 Morten Rasmussen : > >> > I assume you are

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-22 Thread Morten Rasmussen
On Mon, Aug 22, 2016 at 09:48:19AM +0800, Wanpeng Li wrote: > 2016-08-19 22:03 GMT+08:00 Morten Rasmussen : > > On Fri, Aug 19, 2016 at 09:43:00AM +0800, Wanpeng Li wrote: > >> 2016-08-18 21:45 GMT+08:00 Morten Rasmussen : > >> > I assume you are referring to using task_util_peak() instead of > >>

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-21 Thread Wanpeng Li
2016-08-19 22:03 GMT+08:00 Morten Rasmussen : > On Fri, Aug 19, 2016 at 09:43:00AM +0800, Wanpeng Li wrote: >> 2016-08-18 21:45 GMT+08:00 Morten Rasmussen : >> > I assume you are referring to using task_util_peak() instead of >> > task_util() in

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-21 Thread Wanpeng Li
2016-08-19 22:03 GMT+08:00 Morten Rasmussen : > On Fri, Aug 19, 2016 at 09:43:00AM +0800, Wanpeng Li wrote: >> 2016-08-18 21:45 GMT+08:00 Morten Rasmussen : >> > I assume you are referring to using task_util_peak() instead of >> > task_util() in wake_cap()? >> >> Yes. >> >> > >> > The peak value

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-19 Thread Morten Rasmussen
On Fri, Aug 19, 2016 at 09:43:00AM +0800, Wanpeng Li wrote: > 2016-08-18 21:45 GMT+08:00 Morten Rasmussen : > > I assume you are referring to using task_util_peak() instead of > > task_util() in wake_cap()? > > Yes. > > > > > The peak value should never exceed the

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-19 Thread Morten Rasmussen
On Fri, Aug 19, 2016 at 09:43:00AM +0800, Wanpeng Li wrote: > 2016-08-18 21:45 GMT+08:00 Morten Rasmussen : > > I assume you are referring to using task_util_peak() instead of > > task_util() in wake_cap()? > > Yes. > > > > > The peak value should never exceed the util_avg accumulated by the

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Wanpeng Li
2016-08-18 21:45 GMT+08:00 Morten Rasmussen : > On Thu, Aug 18, 2016 at 07:46:44PM +0800, Wanpeng Li wrote: >> 2016-08-18 18:24 GMT+08:00 Morten Rasmussen : >> > On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: >> >> On Mon, Aug

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Wanpeng Li
2016-08-18 21:45 GMT+08:00 Morten Rasmussen : > On Thu, Aug 18, 2016 at 07:46:44PM +0800, Wanpeng Li wrote: >> 2016-08-18 18:24 GMT+08:00 Morten Rasmussen : >> > On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: >> >> On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Morten Rasmussen
On Thu, Aug 18, 2016 at 07:46:44PM +0800, Wanpeng Li wrote: > 2016-08-18 18:24 GMT+08:00 Morten Rasmussen : > > On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: > >> On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: > >> > On Mon, Aug 15,

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Morten Rasmussen
On Thu, Aug 18, 2016 at 07:46:44PM +0800, Wanpeng Li wrote: > 2016-08-18 18:24 GMT+08:00 Morten Rasmussen : > > On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: > >> On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: > >> > On Mon, Aug 15, 2016 at 04:23:42PM +0200,

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Wanpeng Li
2016-08-18 18:24 GMT+08:00 Morten Rasmussen : > On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: >> On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: >> > On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: >> > > But unlike

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Wanpeng Li
2016-08-18 18:24 GMT+08:00 Morten Rasmussen : > On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: >> On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: >> > On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: >> > > But unlike that function, it doesn't

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Morten Rasmussen
On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: > On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: > > On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > > > But unlike that function, it doesn't actually use __update_load_avg(). > > > Why not? > >

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Morten Rasmussen
On Thu, Aug 18, 2016 at 09:40:55AM +0100, Morten Rasmussen wrote: > On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: > > On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > > > But unlike that function, it doesn't actually use __update_load_avg(). > > > Why not? > >

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Morten Rasmussen
On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: > On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > > But unlike that function, it doesn't actually use __update_load_avg(). > > Why not? > > Fair question :) > > We currently exploit the fact that the task

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-18 Thread Morten Rasmussen
On Mon, Aug 15, 2016 at 04:42:37PM +0100, Morten Rasmussen wrote: > On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > > But unlike that function, it doesn't actually use __update_load_avg(). > > Why not? > > Fair question :) > > We currently exploit the fact that the task

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-15 Thread Morten Rasmussen
On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > On Mon, Jul 25, 2016 at 02:34:27PM +0100, Morten Rasmussen wrote: > > To solve this problem, this patch introduces task_util_wake() which > > computes the decayed task utilization based on the last update of the > > previous cpu's

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-15 Thread Morten Rasmussen
On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > On Mon, Jul 25, 2016 at 02:34:27PM +0100, Morten Rasmussen wrote: > > To solve this problem, this patch introduces task_util_wake() which > > computes the decayed task utilization based on the last update of the > > previous cpu's

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-15 Thread Peter Zijlstra
On Mon, Jul 25, 2016 at 02:34:27PM +0100, Morten Rasmussen wrote: > To solve this problem, this patch introduces task_util_wake() which > computes the decayed task utilization based on the last update of the > previous cpu's last load-tracking update. It is done without having to > take the rq

Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-08-15 Thread Peter Zijlstra
On Mon, Jul 25, 2016 at 02:34:27PM +0100, Morten Rasmussen wrote: > To solve this problem, this patch introduces task_util_wake() which > computes the decayed task utilization based on the last update of the > previous cpu's last load-tracking update. It is done without having to > take the rq

[PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-07-25 Thread Morten Rasmussen
At task wake-up load-tracking isn't updated until the task is enqueued. The task's own view of its utilization contribution may therefore not be aligned with its contribution to the cfs_rq load-tracking which may have been updated in the meantime. Basically, the task's own utilization hasn't yet

[PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly

2016-07-25 Thread Morten Rasmussen
At task wake-up load-tracking isn't updated until the task is enqueued. The task's own view of its utilization contribution may therefore not be aligned with its contribution to the cfs_rq load-tracking which may have been updated in the meantime. Basically, the task's own utilization hasn't yet