Latency is the time delay between the moment something is initiated, and the moment one of its effects begins or becomes detectable.
Why do you care? Well, some power management modes save a ton of power, but also increase the time it takes to respond to these interrupts.
Most users don’t care as these delays are typically in the μs or low ms range, but you might if you’re on a server processing financial data or mixing desk with 20 real time music streams.
A new project is born. latency-policy is a set of scripts that allow an admin to define a rough latency that is acceptable. Why latency? Well most of the power saving stuff we are working on saves a bunch of power doing things like turning off hardware or powering down data links. These all have different, non-trivial reinitialisation times, which is why we probably need some sort of simple userspace tool to set these at startup according to some simple metric. We really don’t need to (or want to) export all these settings to the UI as most of them are pretty meaningless to 99.99% of users. At the moment only things like ALPM, ASPM and ondemand are supported by latency policy, but it’s designed to be easily pluggable as other schemes become possible to be used in Linux. There’s a 0.1 release (that may or may not work on your system) here, a noarch rpm for fedora here and a git tree available on my people page (git clone git://people.freedesktop.org/~hughsient/latency-policy).
Patches welcome. There’s no mailing list as this is a super trivial project, but I really would like to see some buy in from distros for this sort of system policy stuff. Thanks.
Is this a set of knobs to allow the user to define what policy he/she wants? Or is it a set of API’s for applications to tell the system what latency they need?
I hope it’s the latter, because giving the users questions that they’re not able to answer, or where the answer is different depending on what they’re doing at that moment is not the way to go. I suspect however you mean the former, since you mention: “We really don’t need to (or want to) export all these settings to the UI as most of them are pretty meaningless to 99.99% of users.”
Anyway – my opinion is in no small part due to this eye-opening post: http://mjg59.livejournal.com/92880.html
Review request here: https://bugzilla.redhat.com/show_bug.cgi?id=455149
I agree latency is a key to power / policy definition. Have you looked at PM_QOS? http://free-electrons.com/articles/conferences/elc2008-report#gross
Will you make it to the Plumbers confrence?
I think we should talk.
–mgross