]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case
authorLen Brown <len.brown@intel.com>
Mon, 24 May 2010 18:27:44 +0000 (14:27 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 28 May 2010 17:58:57 +0000 (13:58 -0400)
commitaa1261ad9002bf02d25cd880dc62aa511c0e1803
tree6e4b7fc98a125e6af6011ee04e5fbf2d2fe38c4f
parentbf2cc5519d158df3f057aaf204cecd6865a6d672
ACPI: acpi_idle: touch TS_POLLING only in the non-MWAIT case

commit 4145c2a0489916d2bf68c6dd8fd0a685a0976c7a
(ACPI: Be in TS_POLLING state during mwait based C-state entry)
fixed an important power & performance issue where ACPI c2 and c3 C-states
were clearing TS_POLLING even when using MWAIT (ACPI_STATE_FFH).
That bug had been causing us to receive redundant scheduling interrups
when we had already been woken up by MONITOR/MWAIT.

Following up on that...

In the MWAIT case, we don't have to subsequently
check need_resched(), as that c heck was there
for the TS_POLLING-clearing case.

Note that not only does the cpuidle calling function
already check need_resched() before calling us, the
low-level entry into monitor/mwait calls it twice --
guaranteeing that a write to the trigger address
can not go un-noticed.

Also, in this case, we don't have to set TS_POLLING
when we wake, because we never cleared it.

Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Venkatesh Pallipadi <venki@google.com>
drivers/acpi/processor_idle.c