cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.de>
To: john stultz <johnstul@us.ibm.com>
Cc: cpufreq@www.linux.org.uk
Subject: Re: give the TSC a fair chance [Was: [PATCHES] cpufreq_get(), cpufreq->get()]
Date: Mon, 19 Apr 2004 17:32:20 +0200	[thread overview]
Message-ID: <20040419153220.GD7437@dominikbrodowski.de> (raw)
In-Reply-To: <1081977876.4705.123.camel@cog.beaverton.ibm.com>

On Wed, Apr 14, 2004 at 02:24:36PM -0700, john stultz wrote:
> On Wed, 2004-04-14 at 13:57, Dominik Brodowski wrote:
> > On Wed, Apr 14, 2004 at 01:03:27PM -0700, john stultz wrote:
> > > As for the bug you
> > > mentioned, I'm not sure I understand how after you've scheduled 
> > > cpufreq_delayed_get_work() to run it wouldn't run? 
> > 
> > It would run, but too late. See below.
> > 
> > > So 50 consecutive interrupts occur where we notice we missed ticks, at
> > > this point we schedule the function. If the next tick we don't notice
> > > lost interrupts, why would the function not execute?
> > 
> > The following must happen:
> > 50 consecutive interrupts with missed ticks occur
> > -> handle_cpufreq_get_delayed_work() is scheduled
> > 0 to 50 more consecutive interrupts with missed ticks must occur,
> > then one or more interrupts with zero or one missed ticks so that lost_count
> > is reset to zero, and then
> > 50 consecutive interrupts with missed ticks again.
> > _AND_ since the scheduling of handle_cpufreq_get_delayed_work() above
> > this handler running at -10 priority must not have been called ==> so 
> > it's really a very unlikely situation.
> 
> Hmm. That's still not parsing easily, but I think I get it. Might we
> want to turn off the consecutive lost tick accounting after we schedule
> the delayed_work() function, and once that code has executed start
> again? 

We could do it, but it wouldn't save us much. And it would delay falling
back to a "sane" timesource even more...

> And how likely is it that we end up hitting 100 consecutive lost ticks
> and disable the timesource before the delayed_work function gets to run?
> Should that watermark get bumped up some?

... IMO, no. there's already the need for >= 300 ms[*] of consecutive errors in
the TSC handling, and that's really much.

	Dominik

[*] 100 ticks which reach the code and detect >= 2 * 100 lost ticks ==> 
>= 300 ticks    ==>     >= 300 ms

  reply	other threads:[~2004-04-19 15:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-11 21:59 [PATCHES] cpufreq_get(), cpufreq->get() Dominik Brodowski
2004-04-11 22:00 ` patch-02 [Re: [PATCHES] cpufreq_get(), cpufreq->get()] Dominik Brodowski
2004-04-11 22:00 ` patch-04 " Dominik Brodowski
2004-04-11 22:00 ` patch-05 " Dominik Brodowski
2004-04-11 22:01 ` patch-06 " Dominik Brodowski
2004-04-12 12:04 ` give the TSC a fair chance [Was: " Dominik Brodowski
2004-04-14 18:24   ` john stultz
2004-04-14 18:54     ` Dominik Brodowski
2004-04-14 20:03       ` john stultz
2004-04-14 20:57         ` Dominik Brodowski
2004-04-14 21:24           ` john stultz
2004-04-19 15:32             ` Dominik Brodowski [this message]
2004-04-14 10:52 ` [PATCHES] cpufreq_get(), cpufreq->get() Dave Jones

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=20040419153220.GD7437@dominikbrodowski.de \
    --to=linux@dominikbrodowski.de \
    --cc=cpufreq@www.linux.org.uk \
    --cc=johnstul@us.ibm.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