lkml.org 
[lkml]   [2009]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] sched: introduce avg_wakeup

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, 2009-01-14 at 12:59 +0100, Peter Zijlstra wrote:
> > + /*
> > + * Only attribute actual wakeups done by this task.
> > + */
> > + if (!in_interrupt()) {
> > + struct sched_entity *se = &current->se;
> > + u64 sample = se->sum_exec_runtime;
> > +
> > + if (se->last_wakeup)
> > + sample -= se->last_wakeup;
> > + else
> > + sample -= se->start_runtime;
> > + update_avg(&se->avg_wakeup, sample);
> > +
> > + current->se.last_wakeup = current->se.sum_exec_runtime;
> > + }
>
> time for lunch apparently...
>
> Index: linux-2.6/kernel/sched.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched.c
> +++ linux-2.6/kernel/sched.c
> @@ -2424,7 +2424,7 @@ out_activate:
> sample -= se->start_runtime;
> update_avg(&se->avg_wakeup, sample);
>
> - current->se.last_wakeup = current->se.sum_exec_runtime;
> + se.last_wakeup = se.sum_exec_runtime;
> }

mind sending a delta against the first submission? Whenever you are done
with the lunch stuff ;-)

Ingo


\
 
 \ /
  Last update: 2009-01-14 13:09    [W:0.057 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site