From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Arjan van de Ven <arjan@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, len.brown@intel.com
Subject: Re: [RFC] maximum latency tracking infrastructure
Date: Thu, 24 Aug 2006 14:29:45 -0700 [thread overview]
Message-ID: <200608241429.45791.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <44EE1801.3060805@linux.intel.com>
On Thursday, August 24, 2006 2:20 pm, Arjan van de Ven wrote:
> Jesse Barnes wrote:
> > On Thursday, August 24, 2006 10:41 am, Arjan van de Ven wrote:
> >> The reason for adding this infrastructure is that power management
> >> in the idle loop needs to make a tradeoff between latency and power
> >> savings (deeper power save modes have a longer latency to running
> >> code again).
> >
> > What if a processor was already in a sleep state when a call to
> > set_acceptable_latency() latency occurs?
>
> there's nothing sane that can be done in that case; any wake up
> already will cause the unwanted latency! A premature wakeup is only
> making it happen *now*, but now is as inconvenient a time as any...
> (in fact it may be a worst case time scenario, say, an audio
> interrupt...)
Depends on what's going on. What if you have a two socket machine, and
one CPU is in C3 when the latency setting occurs? Shouldn't you wake it
up and prevent it from going that deep again? But you're right, you
won't necessarily improve anything...
>
> > Should there be a callback so
> > they can be woken up? A callback would also allow ACPI to tell the
> > user "disabling C3 because of device <foo>" or somesuch, which might
> > be nice.
>
> printk'ing would be evil, changes like this will be "semi frequent",
> like every time you start or stop playing audio. What ACPI could
> easily do is indicate in /proc/acpi/processor/*/power that a state
> will not be reachable because it violates the latency constraints.
> That would be entirely reasonable.
Right, that's the idea. A printk may be overkill but some kind of
notification might be nice, for similar reasons to the below.
> > Also, should subsystems have the ability to set a lower bound on
> > latency? That would mean set_acceptable_latency() could fail,
> > indicating that the user should buy a better device or a system with
> > better realtime guarantees, which is also valuable info.
>
> While it's valuable info.. there is nothing you can DO about it...
> While the kernel can even do a latency of 1us by just not going into
> C1 even... so the kernel CAN honor it, even if it thinks it might not
> be a good idea. Can you give a more concrete example of a situation
> where you think your idea would be useful?
Well, I was imagining a scenario where you didn't really want to disallow
C3 for whatever reason (maybe some standard you're following requires
it), so your minimum latency would be N usec. You'd definitely want to
know about any device that required < N usecs of latency (at boot or
driver init time) so that you'd know you had a bad device or system.
Jesse
next prev parent reply other threads:[~2006-08-24 21:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-24 17:41 Arjan van de Ven
2006-08-24 19:18 ` Len Brown
2006-08-24 21:08 ` Jesse Barnes
2006-08-24 21:20 ` Arjan van de Ven
2006-08-24 21:29 ` Jesse Barnes [this message]
2006-08-24 21:50 ` Andi Kleen
2006-08-25 4:54 ` Nick Piggin
2006-08-25 7:58 ` Arjan van de Ven
2006-08-25 8:26 ` Nick Piggin
2006-08-25 8:30 ` Arjan van de Ven
2006-08-24 21:52 ` Daniel Walker
2006-08-24 21:57 ` Arjan van de Ven
2006-08-24 22:16 ` Daniel Walker
2006-08-24 22:24 ` Matthew Garrett
2006-08-25 8:19 ` Arjan van de Ven
2006-08-24 22:52 ` Matt Mackall
2006-08-25 7:56 ` Arjan van de Ven
2006-08-25 14:54 ` Matt Mackall
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=200608241429.45791.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=arjan@linux.intel.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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