Revision 2548d546d40c0014efdde88a53bf7896e917dcce authored by Peter Zijlstra on 21 April 2016, 16:03:15 UTC, committed by Ingo Molnar on 28 April 2016, 08:28:55 UTC
Chris Metcalf reported a that sched_can_stop_tick() sometimes fails to
re-enable the tick.

His observed problem is that rq->cfs.nr_running can be 1 even though
there are multiple runnable CFS tasks. This happens in the cgroup
case, in which case cfs.nr_running is the number of runnable entities
for that level.

If there is a single runnable cgroup (which can have an arbitrary
number of runnable child entries itself) rq->cfs.nr_running will be 1.

However, looking at that function I think there's more problems with it.

It seems to assume that if there's FIFO tasks, those will run. This is
incorrect. The FIFO task can have a lower prio than an RR task, in which
case the RR task will run.

So the whole fifo_nr_running test seems misplaced, it should go after
the rr_nr_running tests. That is, only if !rr_nr_running, can we use
fifo_nr_running like this.

Reported-by: Chris Metcalf <cmetcalf@mellanox.com>
Tested-by: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Wanpeng Li <kernellwp@gmail.com>
Fixes: 76d92ac305f2 ("sched: Migrate sched to use new tick dependency mask model")
Link: http://lkml.kernel.org/r/20160421160315.GK24771@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 02da2d7
History
File Mode Size
Kconfig -rw-r--r-- 22.0 KB
Makefile -rw-r--r-- 4.1 KB
spi-adi-v3.c -rw-r--r-- 24.9 KB
spi-altera.c -rw-r--r-- 7.1 KB
spi-ath79.c -rw-r--r-- 7.3 KB
spi-atmel.c -rw-r--r-- 45.0 KB
spi-au1550.c -rw-r--r-- 25.7 KB
spi-axi-spi-engine.c -rw-r--r-- 14.9 KB
spi-bcm2835.c -rw-r--r-- 23.0 KB
spi-bcm2835aux.c -rw-r--r-- 14.7 KB
spi-bcm53xx.c -rw-r--r-- 6.9 KB
spi-bcm53xx.h -rw-r--r-- 2.6 KB
spi-bcm63xx-hsspi.c -rw-r--r-- 12.5 KB
spi-bcm63xx.c -rw-r--r-- 16.1 KB
spi-bfin-sport.c -rw-r--r-- 22.7 KB
spi-bfin5xx.c -rw-r--r-- 39.7 KB
spi-bitbang-txrx.h -rw-r--r-- 3.3 KB
spi-bitbang.c -rw-r--r-- 10.5 KB
spi-butterfly.c -rw-r--r-- 8.3 KB
spi-cadence.c -rw-r--r-- 20.2 KB
spi-clps711x.c -rw-r--r-- 5.2 KB
spi-coldfire-qspi.c -rw-r--r-- 13.1 KB
spi-davinci.c -rw-r--r-- 29.0 KB
spi-dln2.c -rw-r--r-- 20.7 KB
spi-dw-mid.c -rw-r--r-- 7.9 KB
spi-dw-mmio.c -rw-r--r-- 3.2 KB
spi-dw-pci.c -rw-r--r-- 3.5 KB
spi-dw.c -rw-r--r-- 14.4 KB
spi-dw.h -rw-r--r-- 6.1 KB
spi-efm32.c -rw-r--r-- 11.8 KB
spi-ep93xx.c -rw-r--r-- 24.3 KB
spi-falcon.c -rw-r--r-- 10.5 KB
spi-fsl-cpm.c -rw-r--r-- 10.1 KB
spi-fsl-cpm.h -rw-r--r-- 1.6 KB
spi-fsl-dspi.c -rw-r--r-- 18.8 KB
spi-fsl-espi.c -rw-r--r-- 21.7 KB
spi-fsl-lib.c -rw-r--r-- 4.3 KB
spi-fsl-lib.h -rw-r--r-- 3.4 KB
spi-fsl-spi.c -rw-r--r-- 22.6 KB
spi-fsl-spi.h -rw-r--r-- 2.0 KB
spi-gpio.c -rw-r--r-- 14.7 KB
spi-img-spfi.c -rw-r--r-- 20.6 KB
spi-imx.c -rw-r--r-- 33.7 KB
spi-lm70llp.c -rw-r--r-- 9.0 KB
spi-loopback-test.c -rw-r--r-- 24.3 KB
spi-lp8841-rtc.c -rw-r--r-- 5.9 KB
spi-meson-spifc.c -rw-r--r-- 11.3 KB
spi-mpc512x-psc.c -rw-r--r-- 16.1 KB
spi-mpc52xx-psc.c -rw-r--r-- 13.3 KB
spi-mpc52xx.c -rw-r--r-- 14.1 KB
spi-mt65xx.c -rw-r--r-- 20.1 KB
spi-mxs.c -rw-r--r-- 14.2 KB
spi-nuc900.c -rw-r--r-- 8.9 KB
spi-oc-tiny.c -rw-r--r-- 8.6 KB
spi-octeon.c -rw-r--r-- 6.2 KB
spi-omap-100k.c -rw-r--r-- 12.4 KB
spi-omap-uwire.c -rw-r--r-- 12.4 KB
spi-omap2-mcspi.c -rw-r--r-- 38.6 KB
spi-orion.c -rw-r--r-- 15.8 KB
spi-pl022.c -rw-r--r-- 68.1 KB
spi-ppc4xx.c -rw-r--r-- 13.6 KB
spi-pxa2xx-dma.c -rw-r--r-- 8.7 KB
spi-pxa2xx-pci.c -rw-r--r-- 5.6 KB
spi-pxa2xx.c -rw-r--r-- 45.9 KB
spi-pxa2xx.h -rw-r--r-- 4.0 KB
spi-qup.c -rw-r--r-- 26.5 KB
spi-rb4xx.c -rw-r--r-- 5.1 KB
spi-rockchip.c -rw-r--r-- 21.6 KB
spi-rspi.c -rw-r--r-- 34.2 KB
spi-s3c24xx-fiq.S -rw-r--r-- 2.9 KB
spi-s3c24xx-fiq.h -rw-r--r-- 671 bytes
spi-s3c24xx.c -rw-r--r-- 15.1 KB
spi-s3c64xx.c -rw-r--r-- 37.4 KB
spi-sc18is602.c -rw-r--r-- 7.7 KB
spi-sh-hspi.c -rw-r--r-- 6.5 KB
spi-sh-msiof.c -rw-r--r-- 34.3 KB
spi-sh-sci.c -rw-r--r-- 4.7 KB
spi-sh.c -rw-r--r-- 11.9 KB
spi-sirf.c -rw-r--r-- 35.5 KB
spi-st-ssc4.c -rw-r--r-- 11.5 KB
spi-sun4i.c -rw-r--r-- 11.4 KB
spi-sun6i.c -rw-r--r-- 11.8 KB
spi-tegra114.c -rw-r--r-- 33.1 KB
spi-tegra20-sflash.c -rw-r--r-- 16.3 KB
spi-tegra20-slink.c -rw-r--r-- 33.6 KB
spi-test.h -rw-r--r-- 5.3 KB
spi-ti-qspi.c -rw-r--r-- 15.5 KB
spi-tle62x0.c -rw-r--r-- 7.2 KB
spi-topcliff-pch.c -rw-r--r-- 46.6 KB
spi-txx9.c -rw-r--r-- 11.0 KB
spi-xcomm.c -rw-r--r-- 5.8 KB
spi-xilinx.c -rw-r--r-- 14.1 KB
spi-xlp.c -rw-r--r-- 11.4 KB
spi-xtensa-xtfpga.c -rw-r--r-- 4.0 KB
spi-zynqmp-gqspi.c -rw-r--r-- 33.2 KB
spi.c -rw-r--r-- 84.7 KB
spidev.c -rw-r--r-- 21.1 KB

back to top