mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] sched: introduce avg_wakeup
Date: Wed, 14 Jan 2009 13:03:14 +0100	[thread overview]
Message-ID: <1231934594.7141.30.camel@twins> (raw)
In-Reply-To: <1231934371.7141.29.camel@twins>

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;
 	}
 
 out_running:


  reply	other threads:[~2009-01-14 12:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 11:39 [PATCH 0/2] prefer wakers -v2 Peter Zijlstra
2009-01-14 11:39 ` [PATCH 1/2] sched: introduce avg_wakeup Peter Zijlstra
2009-01-14 11:59   ` Peter Zijlstra
2009-01-14 12:03     ` Peter Zijlstra [this message]
2009-01-14 12:04       ` Peter Zijlstra
2009-01-14 12:05       ` Ingo Molnar
2009-01-14 13:20         ` Peter Zijlstra
2009-01-15 11:00           ` Ingo Molnar
2009-01-14 11:39 ` [PATCH 2/2] sched: prefer wakers Peter Zijlstra
2009-01-14 11:47 ` [PATCH 0/2] prefer wakers -v2 Ingo Molnar
2009-01-14 12:14   ` Mike Galbraith
2009-01-16 14:27 ` Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1231934594.7141.30.camel@twins \
    --to=peterz@infradead.org \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome