linux/arch/powerpc/platforms/pseries
Deepthi Dharwar 83dac59409 cpuidle/powerpc: Fix snooze state problem in the cpuidle design on pseries.
Earlier without cpuidle framework on pseries, the native arch
idle routine comprised of both snooze and nap
states.  smt_snooze_delay variable was used to delay
the idle process entry to deeper idle state like  nap.
With the coming of cpuidle, this arch specific idle was replaced
by two different idle routines, one for supporting snooze and other
for nap. This enabled addition of more
low level idle states on pseries in the future.

On adopting the generic cpuidle framework for POWER systems,
the decision of which idle state to choose from,  given a predicted
idle time is taken by the menu governor based on
target_residency and  exit_latency of the idle states.
target_residency is the minimum time to be resident in that idle state.
Exit_latency is time taken to exit out of idle state.
Deeper the idle state, both the target residency and exit latency
would be higher.

In the current design, smt_snooze_delay is used as target_residency
for the  snooze state which is incorrect, as it is not the
minimum but the maximum duration to be in snooze state.
This would  result in the governor in taking bad decision,
as presently target_residency of nap < target_residency of snooze
inspite of nap being deeper idle state.

This patch aims to fix this problem by replacing the smt_snooze_delay loop
in snooze state, with the need_resched()  as the governor is aware of
entry and exit of various idle transitions based on which
next idle time prediction.

The governor is intelligent enough to determine the idle state the needs to
be transitioned to and maintains a whole of heuristics including
io load, previous idle states predictions etc for the same, based on
which idle state entry decision is taken.

With this fix, of setting target_residency of snooze to 0
					     nap to smt_snooze_delay
if the predicted idle time is less
than smt_snooze_delay (target_residency of nap)
value governor would pick snooze state, else nap. This adhers to the
previous native idle design.

Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-10-18 10:57:25 +11:00
..
cmm.c power: cmm - convert sysdev_class to a regular subsystem 2011-12-21 15:09:51 -08:00
dlpar.c powerpc/pseries: Avoid spurious error during hotplug CPU add 2011-09-20 09:20:00 +10:00
dtl.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
eeh_cache.c powerpc/eeh: Cleanup on EEH PCI address cache 2012-09-10 09:59:00 +10:00
eeh_dev.c powerpc/eeh: Create PEs for PHBs 2012-09-10 09:35:30 +10:00
eeh_driver.c powerpc/eeh: Lock module while handling EEH event 2012-09-18 15:32:48 +10:00
eeh_event.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-10-13 10:05:52 +09:00
eeh_pe.c powerpc/eeh: Don't release eeh_mutex in eeh_phb_pe_get 2012-09-27 12:51:07 +10:00
eeh_pseries.c powerpc/eeh: Probe mode support 2012-09-10 09:35:44 +10:00
eeh_sysfs.c powerpc/eeh: Move stats to PE 2012-09-10 09:35:43 +10:00
eeh.c powerpc/eeh: Fix crash on converting OF node to edev 2012-09-18 15:32:51 +10:00
event_sources.c powerpc/pseries: Add WARN_ON() to request_event_sources_irqs() on irq allocation/request failure 2010-07-09 11:28:32 +10:00
firmware.c powerpc: Add VPHN firmware feature 2010-11-29 15:48:22 +11:00
hotplug-cpu.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
hotplug-memory.c arch/powerpc/platforms/pseries/hotplug-memory.c: section removal cleanups 2012-10-11 08:50:14 +09:00
hvCall_inst.c powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit 2012-01-03 12:09:27 +11:00
hvCall.S powerpc: Merge STK_REG/PARAM/FRAMESIZE 2012-07-10 19:18:03 +10:00
hvconsole.c powerpc: convert hvconsole.c to export.h ; fix implicit use of errno.h 2011-10-31 19:30:43 -04:00
hvcserver.c
io_event_irq.c powerpc: Make function that parses RTAS error logs global 2012-03-28 11:31:58 +11:00
iommu.c powerpc: Remove all includes of <asm/abs_addr.h> 2012-09-05 15:19:33 +10:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
kexec.c powerpc/pseries: Simplify vpa deregistration functions 2011-08-05 14:47:58 +10:00
lpar.c powerpc/mm: Convert virtual address to vpn 2012-09-17 16:31:49 +10:00
Makefile powerpc/eeh: Create PEs for PHBs 2012-09-10 09:35:30 +10:00
mobility.c of: Improve prom_update_property() function 2012-07-11 15:26:51 +10:00
msi.c powerpc/eeh: Trace error based on PE from beginning 2012-09-10 09:35:33 +10:00
nvram.c kmsg - kmsg_dump() use iterator to receive log buffer content 2012-06-15 14:53:59 -07:00
offline_states.h powerpc/smp: soft-replugged CPUs must go back to start_secondary 2011-04-01 15:37:09 +11:00
pci_dlpar.c powerpc/eeh: Remove EEH PE for normal PCI hotplug 2012-09-18 15:32:23 +10:00
pci.c powerpc/eeh: Cleanup on EEH PCI address cache 2012-09-10 09:59:00 +10:00
plpar_wrappers.h powerpc: Clean up lppaca->cede_latency_hint 2012-04-30 15:37:15 +10:00
power.c [POWERPC] Fix warning in pseries/power.c 2008-02-20 13:33:37 +11:00
processor_idle.c cpuidle/powerpc: Fix snooze state problem in the cpuidle design on pseries. 2012-10-18 10:57:25 +11:00
pseries_energy.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
pseries.h powerpc/cpuidle: cpuidle driver for pSeries 2011-12-08 13:56:31 +11:00
ras.c Disintegrate asm/system.h for PowerPC 2012-03-28 18:30:02 +01:00
reconfig.c of: Improve prom_update_property() function 2012-07-11 15:26:51 +10:00
scanlog.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
setup.c powerpc: Dynamically calculate the dabrx based on kernel/user/hypervisor 2012-09-10 09:59:13 +10:00
smp.c powerpc/pseries/cpuidle: Replace pseries_notify_cpuidle_add call with notifier 2012-07-03 14:14:40 +10:00
suspend.c powerpc/pseries: Fix partition migration hang in stop_topology_update 2012-02-14 15:01:39 +11:00