The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Venkatesh Pallipadi <venki@google.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Ken Chen <kenchen@google.com>,
	Paul Turner <pjt@google.com>, Nikhil Rao <ncrao@google.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>
Subject: Re: [PATCH] sched: Avoid side-effect of tickless idle on  update_cpu_load (v2)
Date: Tue, 18 May 2010 17:12:02 +0200	[thread overview]
Message-ID: <1274195522.5605.8141.camel@twins> (raw)
In-Reply-To: <AANLkTik4EvvSwz9rD3zemuaSN3FMAIqsncZ5AKYOdaEn@mail.gmail.com>

On Mon, 2010-05-17 at 10:52 -0700, Venkatesh Pallipadi wrote:
> > load_i = ((2^i)-1)/(2^i) * load_i + 1/(2^i) * load_(i-1)
> >
> > not
> >
> > load_i = ((2^i)-1)/(2^i) * load_i + 1/(2^i) * cur_load
> 
> Hmm. I assumed you meant
> load_(i-1) is same as cur_load when you said
> >> >Where load_-1 == current load.
> 
> No? Or did I miss something?

load_(i-1) is only load_-1 when i == 0.

But it seems you're right and I misread the code. update_cpu_load() does
take a copy of this_load for each iteration, initially I thought it used
the load of the last iteration.

> For the updates done every tick, it is
> load = degrade * load + (1-degrade) * cur_load
> For updates done with missed ticks
> load = degrade^(missed-1) * load
> load = degrade * load + (1-degrade) * cur_load
> 
> So, cur_load is only accounted for the last tick, and zero load
> assumed for all the missed ticks. 

Right.

      parent reply	other threads:[~2010-05-18 15:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15  1:21 [PATCH] sched: Avoid side-effect of tickless idle on update_cpu_load (v2) Venkatesh Pallipadi
2010-05-17  8:19 ` Peter Zijlstra
2010-05-17 16:52   ` Venkatesh Pallipadi
2010-05-17 17:35     ` Peter Zijlstra
2010-05-17 17:52       ` Venkatesh Pallipadi
2010-05-18  1:14         ` Venkatesh Pallipadi
2010-05-18 15:20           ` Peter Zijlstra
2010-05-18 16:04             ` Venkatesh Pallipadi
2010-05-21 11:27           ` [tip:sched/urgent] sched: Avoid side-effect of tickless idle on update_cpu_load tip-bot for Venkatesh Pallipadi
2010-05-21 17:03             ` Ingo Molnar
2010-05-21 17:09               ` Peter Zijlstra
2010-05-21 18:18                 ` Venkatesh Pallipadi
2010-06-09 10:13           ` [tip:sched/core] " tip-bot for Venkatesh Pallipadi
2010-05-18 15:12         ` Peter Zijlstra [this message]

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=1274195522.5605.8141.camel@twins \
    --to=peterz@infradead.org \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncrao@google.com \
    --cc=pjt@google.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=venki@google.com \
    /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