android_kernel_xiaomi_sm8350/drivers/acpi
Arjan van de Ven 5c87579e65 [PATCH] maximum latency tracking infrastructure
Add infrastructure to track "maximum allowable latency" for power saving
policies.

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).  The
code that today makes this tradeoff just does a rather simple algorithm;
however this is not good enough: There are devices and use cases where a
lower latency is required than that the higher power saving states provide.
 An example would be audio playback, but another example is the ipw2100
wireless driver that right now has a very direct and ugly acpi hook to
disable some higher power states randomly when it gets certain types of
error.

The proposed solution is to have an interface where drivers can

* announce the maximum latency (in microseconds) that they can deal with
* modify this latency
* give up their constraint

and a function where the code that decides on power saving strategy can
query the current global desired maximum.

This patch has a user of each side: on the consumer side, ACPI is patched
to use this, on the producer side the ipw2100 driver is patched.

A generic maximum latency is also registered of 2 timer ticks (more and you
lose accurate time tracking after all).

While the existing users of the patch are x86 specific, the infrastructure
is not.  I'd like to ask the arch maintainers of other architectures if the
infrastructure is generic enough for their use (assuming the architecture
has such a tradeoff as concept at all), and the sound/multimedia driver
owners to look at the driver facing API to see if this is something they
can use.

[akpm@osdl.org: cleanups]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jesse Barnes <jesse.barnes@intel.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:19 -07:00
..
dispatcher ACPI: ACPICA 20060707 2006-07-09 15:15:40 -04:00
events ACPI: ACPICA 20060707 2006-07-09 15:15:40 -04:00
executer Pull acpica-20060707 into test branch 2006-07-10 02:39:41 -04:00
hardware ACPI: ACPICA 20060623 2006-06-28 03:11:38 -04:00
namespace ACPI: ACPICA 20060707 2006-07-09 15:15:40 -04:00
parser ACPI: acpi_os_allocate() fixes 2006-07-10 02:37:22 -04:00
resources ACPI: ACPICA 20060526 2006-06-14 02:44:35 -04:00
sleep ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
tables ACPI: ACPICA 20060707 2006-07-09 15:15:40 -04:00
utilities Pull acpi_os_allocate into test branch 2006-07-10 02:39:47 -04:00
ac.c ACPI: fix boot with acpi=off 2006-08-15 23:16:43 -04:00
acpi_memhotplug.c [PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup 2006-10-01 00:39:18 -07:00
asus_acpi.c ACPI: asus_acpi: correct M6N/M6R display nodes 2006-07-01 16:20:10 -04:00
battery.c ACPI: fix boot with acpi=off 2006-08-15 23:16:43 -04:00
blacklist.c [PATCH] x86_64: Clean up and tweak ACPI blacklist year code 2006-03-25 09:10:54 -08:00
bus.c ACPI: add message if firmware_register() init fails 2006-08-15 23:27:38 -04:00
button.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
cm_sbs.c ACPI: SBS: fix initialization, sem2mutex 2006-07-10 02:34:45 -04:00
container.c ACPI: delete acpi_os_free(), use kfree() directly 2006-06-30 03:19:10 -04:00
debug.c ACPI: delete tracing macros from drivers/acpi/*.c 2006-06-27 00:41:40 -04:00
dock.c PCI: docking station: remove dock uevents 2006-08-03 13:20:06 -07:00
ec.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
event.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
fan.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
glue.c ACPI: delete acpi_os_free(), use kfree() directly 2006-06-30 03:19:10 -04:00
hotkey.c ACPI: hotkey.c fixes, fix for potential crash of hotkey.c 2006-08-16 18:08:06 -04:00
i2c_ec.c i2c: Constify i2c_algorithm declarations, part 2 2006-09-26 15:38:52 -07:00
i2c_ec.h ACPI: add support for Smart Battery 2006-07-01 16:36:14 -04:00
ibm_acpi.c ACPI: Allow a WAN module enable/disable on a Thinkpad X60. 2006-06-01 20:42:32 -04:00
Kconfig [PATCH] x86_64: Fix up bogus defaults in ACPI Kconfig 2006-07-10 15:12:33 -07:00
Makefile Revert "Revert "ACPI: dock driver"" 2006-07-09 17:22:28 -04:00
motherboard.c ACPI: delete tracing macros from drivers/acpi/*.c 2006-06-27 00:41:40 -04:00
numa.c ACPI: remove function tracing macros from drivers/acpi/*.c 2006-07-01 16:48:23 -04:00
osl.c [PATCH] Really ignore kmem_cache_destroy return value 2006-09-27 08:26:10 -07:00
pci_bind.c ACPI: delete tracing macros from drivers/acpi/*.c 2006-06-27 00:41:40 -04:00
pci_irq.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2006-06-30 15:39:30 -07:00
pci_link.c ACPI: acpi_os_allocate() fixes 2006-07-10 02:37:22 -04:00
pci_root.c ACPI: pci_root: Remove unneeded acpi_handle from driver. 2006-06-30 02:51:34 -04:00
power.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
processor_core.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
processor_idle.c [PATCH] maximum latency tracking infrastructure 2006-10-01 00:39:19 -07:00
processor_perflib.c ACPI: delete acpi_os_free(), use kfree() directly 2006-06-30 03:19:10 -04:00
processor_thermal.c ACPI: delete tracing macros from drivers/acpi/*.c 2006-06-27 00:41:40 -04:00
processor_throttling.c ACPI: delete tracing macros from drivers/acpi/*.c 2006-06-27 00:41:40 -04:00
sbs.c ACPI: skip smart battery init when acpi=off 2006-08-15 23:21:37 -04:00
scan.c ACPI: verbose on kset/kobject_register errors 2006-08-15 23:32:24 -04:00
system.c ACPI: add 'const' to several ACPI file_operations 2006-07-10 00:04:29 -04:00
tables.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
thermal.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2006-07-10 15:14:38 -07:00
toshiba_acpi.c
utils.c ACPI: avoid irqrouter_resume might_sleep oops on resume from S4 2006-08-16 19:23:00 -04:00
video.c Pull acpi_device_handle_cleanup into release branch 2006-07-01 17:19:34 -04:00