lkml.org 
[lkml]   [2014]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] sched: Rewrite per entity runnable load average tracking
Thanks, Peter.

On Mon, Jul 07, 2014 at 12:46:46PM +0200, Peter Zijlstra wrote:
>
> That tg->load_avg cacheline is already red hot glowing, and you've just
> increased the amount of updates to it.. That's not going to be pleasant.
>

Logically, this rewrite updates tg->load_avg as soon as it is changed. But
technically, this is not necessary, as it is only needed to be updated when
it is used before update_cfs_shares() and update_cfs_rq_h_load().

Yes, I can optimize it.

> So here you add the task to the cfs_rq avg when its got migrate in,
> however:
>
> > @@ -4552,17 +4326,9 @@ migrate_task_rq_fair(struct task_struct *p, int next_cpu)
> > struct sched_entity *se = &p->se;
> > struct cfs_rq *cfs_rq = cfs_rq_of(se);
> >
> > + /* Update task on old CPU, then ready to go (entity must be off the queue) */
> > + __update_load_avg(cfs_rq_clock_task(cfs_rq), &se->avg, 0);
> > + se->avg.last_update_time = 0;
> >
> > /* We have migrated, no longer consider this task hot */
> > se->exec_start = 0;
>
> there you don't remove it first..
>

Yes, I missed it. I wonder what I was thinking. Migration is the only reason
to track task load average...

Yuyang


\
 
 \ /
  Last update: 2014-07-08 07:02    [W:2.462 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site