linux/drivers
Peter Zijlstra ea81174789 sched, idle: Fix the idle polling state logic
Mike reported that commit 7d1a9417 ("x86: Use generic idle loop")
regressed several workloads and caused excessive reschedule
interrupts.

The patch in question failed to notice that the x86 code had an
inverted sense of the polling state versus the new generic code (x86:
default polling, generic: default !polling).

Fix the two prominent x86 mwait based idle drivers and introduce a few
new generic polling helpers (fixing the wrong smp_mb__after_clear_bit
usage).

Also switch the idle routines to using tif_need_resched() which is an
immediate TIF_NEED_RESCHED test as opposed to need_resched which will
end up being slightly different.

Reported-by: Mike Galbraith <bitbucket@online.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: lenb@kernel.org
Cc: tglx@linutronix.de
Link: http://lkml.kernel.org/n/tip-nc03imb0etuefmzybzj7sprf@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
History 2013-09-25 13:53:10 +02:00
..
accessibility printk: move braille console support into separate braille.[ch] files 2013-07-31 14:41:03 -07:00
acpi sched, idle: Fix the idle polling state logic 2013-09-25 13:53:10 +02:00
amba PM / Runtime: Rework the "runtime idle" helper routine 2013-06-03 21:49:52 +02:00
ata Merge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2013-09-03 18:19:53 -07:00
atm atm: he: print MAC via %pM 2013-09-04 14:41:55 -04:00
auxdisplay Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
base thp: account anon transparent huge pages into NR_ANON_PAGES 2013-09-12 15:38:03 -07:00
bcma bcma: add bcma_core_pci_power_save() 2013-08-26 14:09:03 -04:00
block Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2013-08-22 14:27:31 -04:00
bus ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
cdrom drivers/cdrom/cdrom.c: use kzalloc() for failing hardware 2013-07-03 16:07:25 -07:00
char Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
clk The common clk framework changes for 3.12 are dominated by clock driver 2013-09-09 15:49:04 -07:00
clocksource Merge branch 'timers/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-09-16 16:10:26 -04:00
connector connector: replace obsolete NLMSG_* with type safe nlmsg_* 2013-03-28 14:27:44 -04:00
cpufreq Merge branch 'pm-cpufreq' 2013-09-12 13:04:11 +02:00
cpuidle ACPI and power management fixes for 3.12-rc1 2013-09-12 11:22:45 -07:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2013-09-07 12:53:35 +10:00
dca dca: convert to idr_alloc() 2013-02-27 19:10:15 -08:00
devfreq devfreq: convert devfreq_class to use dev_groups 2013-08-19 21:22:34 -07:00
dio m68k: don't export static inline functions 2009-12-06 11:18:28 +01:00
dma Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
edac Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2013-09-06 11:14:33 -07:00
eisa PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
extcon Driver core patches for 3.12-rc1 2013-09-03 11:37:15 -07:00
firewire firewire: ohci: Fix deadlock at bus reset 2013-08-29 22:35:05 +02:00
firmware firmware/dmi_scan: drop OOM messages 2013-09-11 15:58:51 -07:00
fmc FMC: Staticize local symbols 2013-08-12 15:45:40 -07:00
gpio Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
gpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-12 15:01:38 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-09-17 21:54:05 -04:00
hsi drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
hv Drivers: hv: vmbus: Do not attempt to negoatiate a new version prematurely 2013-08-30 12:08:04 -07:00
hwmon hwmon: (k10temp) remove unnecessary pci_set_drvdata() 2013-09-12 08:17:40 -07:00
hwspinlock A single patch from Vincent extending OMAP's hwspinlock support to OMAP5. 2013-05-07 14:01:27 -07:00
i2c Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ide ide: sgiioc4: Staticize ioc4_ide_attach_one() 2013-09-05 15:21:30 -04:00
idle sched, idle: Fix the idle polling state logic 2013-09-25 13:53:10 +02:00
iio Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
infiniband Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-09-15 07:13:39 -04:00
iommu IOMMU Updates for Linux v3.12 2013-09-12 11:29:26 -07:00
ipack ipack: split ipack_device_register() in several functions 2013-03-15 12:23:09 -07:00
irqchip ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-09-05 14:54:29 -07:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2013-09-12 11:35:33 -07:00
lguest lguest: fix guest kernel stack overflow when TF bit set. 2013-09-06 08:09:27 +09:30
macintosh macintosh/ams: Replace strict_strtoul() with kstrtoul() 2013-08-14 14:57:43 +10:00
mailbox mailbox/omap: move the OMAP mailbox framework to drivers 2013-06-11 11:41:51 -05:00
md Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-09-12 15:01:38 -07:00
media Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
memory ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
memstick memstick: add support for legacy memorysticks 2013-09-11 15:59:35 -07:00
message drivers: avoid format strings in names passed to alloc_workqueue() 2013-07-03 16:07:41 -07:00
mfd Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
misc Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
mmc Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
mtd Just a single fastmap fix plus a regression fix. 2013-09-16 15:37:52 -04:00
net Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-09-15 17:45:52 -04:00
nfc NFC: pn544: i2c: Add firmware download implementation for pn544 2013-08-14 01:13:35 +02:00
ntb ntb: clean up unnecessary MSI/MSI-X capability find 2013-09-05 11:08:01 -07:00
nubus nubus: Kill nubus_proc_detach_device() 2013-05-04 14:47:26 -04:00
of Merge branch 'for-v3.12-fix' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2013-09-11 19:11:59 -07:00
oprofile oprofile: get rid of pointless forward declarations of struct super_block 2013-09-03 22:52:48 -04:00
parisc PCI changes for the v3.12 merge window: 2013-09-03 16:24:35 -07:00
parport drivers: parport: Kconfig: exclude h8300 for PARPORT_PC 2013-08-30 12:08:04 -07:00
pci Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
pcmcia PCI: Delay enabling bridges until they're needed 2013-07-25 12:35:03 -06:00
pinctrl PTR_RET() is a weird name, and led to some confusing usage. We ended 2013-09-04 17:31:11 -07:00
platform Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2013-09-15 17:42:59 -04:00
pnp pnp: change pnp bus pm_ops to invoke pnp driver dev_pm_ops if specified 2013-09-11 15:58:15 -07:00
power Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
pps Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ps3 Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
ptp PTP: convert class code to use dev_groups 2013-07-26 18:05:17 -07:00
pwm ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
rapidio rapidio: fix use after free in rio_unregister_scan() 2013-07-31 14:41:02 -07:00
regulator PTR_RET() is a weird name, and led to some confusing usage. We ended 2013-09-04 17:31:11 -07:00
remoteproc remoteproc: don't use PTR_RET(). 2013-07-15 11:25:04 +09:30
reset reset: NULL deref on allocation failure 2013-04-12 10:26:24 +02:00
rpmsg A small pull request consisting of: 2013-05-07 14:02:00 -07:00
rtc rtc: simplify devm_request_mem_region/devm_ioremap 2013-09-11 15:58:59 -07:00
s390 s390/vmcore: use vmcore for zfcpdump 2013-09-11 15:59:15 -07:00
sbus bbc_i2c: fix section mismatch warning 2013-03-31 19:29:12 -04:00
scsi SCSI misc on 20130915 2013-09-15 17:41:30 -04:00
sfi drivers/sfi: sfi_acpi.c needs sysfs.h 2011-10-31 19:31:57 -04:00
sh Merge branch 'pm-assorted' 2013-06-28 13:01:40 +02:00
sn Drivers: misc: remove __dev* attributes. 2013-01-03 15:57:16 -08:00
spi Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ssb ssb: drop BROKEN from SSB_SFLASH 2013-08-01 15:49:33 -04:00
staging Merge git://git.kvack.org/~bcrl/aio-next 2013-09-13 10:55:58 -07:00
target Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-09-12 16:11:45 -07:00
tc include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
thermal drivers: thermal: add check when unregistering cpu cooling 2013-09-03 09:10:34 -04:00
tty tty: disassociate_ctty() sends the extra SIGCONT 2013-09-17 21:53:32 -04:00
uio Driver core patches for 3.12-rc1 2013-09-03 11:37:15 -07:00
usb Merge git://git.kvack.org/~bcrl/aio-next 2013-09-13 10:55:58 -07:00
uwb uwb: Staticize local symbols 2013-08-19 17:08:16 -07:00
vfio vfio-pci: PCI hot reset interface 2013-09-04 11:28:04 -06:00
vhost Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-09-12 16:11:45 -07:00
video Bye, bye, WfW flag 2013-09-11 19:55:12 -07:00
virt Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-12-18 09:58:09 -08:00
virtio virtio_pci: pm: Use CONFIG_PM_SLEEP instead of CONFIG_PM 2013-09-09 10:02:53 +09:30
vlynq drivers/vlynq: remove depends on CONFIG_EXPERIMENTAL 2013-01-17 12:11:27 -08:00
vme vme: vme_ca91cx42.c: fix to pass correct device identity to free_irq() 2013-08-27 21:49:26 -07:00
w1 Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
watchdog Merge git://www.linux-watchdog.org/linux-watchdog 2013-09-12 08:45:53 -07:00
xen Bug-fixes: 2013-09-12 11:28:24 -07:00
zorro zorro: switch to fixed_size_llseek() 2013-06-29 12:57:28 +04:00
Kconfig For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
Makefile For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00