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
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 12.1 KB |
Makefile | -rw-r--r-- | 1.8 KB |
core.c | -rw-r--r-- | 21.4 KB |
pwm-ab8500.c | -rw-r--r-- | 3.3 KB |
pwm-atmel-hlcdc.c | -rw-r--r-- | 7.7 KB |
pwm-atmel-tcb.c | -rw-r--r-- | 11.7 KB |
pwm-atmel.c | -rw-r--r-- | 10.6 KB |
pwm-bcm-kona.c | -rw-r--r-- | 9.5 KB |
pwm-bcm2835.c | -rw-r--r-- | 5.0 KB |
pwm-berlin.c | -rw-r--r-- | 5.4 KB |
pwm-bfin.c | -rw-r--r-- | 3.1 KB |
pwm-brcmstb.c | -rw-r--r-- | 8.3 KB |
pwm-clps711x.c | -rw-r--r-- | 4.3 KB |
pwm-crc.c | -rw-r--r-- | 3.6 KB |
pwm-ep93xx.c | -rw-r--r-- | 5.8 KB |
pwm-fsl-ftm.c | -rw-r--r-- | 12.2 KB |
pwm-img.c | -rw-r--r-- | 8.0 KB |
pwm-imx.c | -rw-r--r-- | 8.6 KB |
pwm-jz4740.c | -rw-r--r-- | 4.8 KB |
pwm-lp3943.c | -rw-r--r-- | 7.5 KB |
pwm-lpc18xx-sct.c | -rw-r--r-- | 13.6 KB |
pwm-lpc32xx.c | -rw-r--r-- | 4.1 KB |
pwm-lpss-pci.c | -rw-r--r-- | 2.5 KB |
pwm-lpss-platform.c | -rw-r--r-- | 1.9 KB |
pwm-lpss.c | -rw-r--r-- | 4.9 KB |
pwm-lpss.h | -rw-r--r-- | 937 bytes |
pwm-mtk-disp.c | -rw-r--r-- | 6.0 KB |
pwm-mxs.c | -rw-r--r-- | 4.7 KB |
pwm-omap-dmtimer.c | -rw-r--r-- | 10.2 KB |
pwm-pca9685.c | -rw-r--r-- | 9.8 KB |
pwm-puv3.c | -rw-r--r-- | 3.5 KB |
pwm-pxa.c | -rw-r--r-- | 5.5 KB |
pwm-rcar.c | -rw-r--r-- | 6.6 KB |
pwm-renesas-tpu.c | -rw-r--r-- | 11.9 KB |
pwm-rockchip.c | -rw-r--r-- | 7.1 KB |
pwm-samsung.c | -rw-r--r-- | 16.7 KB |
pwm-spear.c | -rw-r--r-- | 6.5 KB |
pwm-sti.c | -rw-r--r-- | 10.0 KB |
pwm-sun4i.c | -rw-r--r-- | 9.0 KB |
pwm-tegra.c | -rw-r--r-- | 5.8 KB |
pwm-tiecap.c | -rw-r--r-- | 8.6 KB |
pwm-tiehrpwm.c | -rw-r--r-- | 16.2 KB |
pwm-tipwmss.c | -rw-r--r-- | 3.3 KB |
pwm-tipwmss.h | -rw-r--r-- | 1.1 KB |
pwm-twl-led.c | -rw-r--r-- | 8.6 KB |
pwm-twl.c | -rw-r--r-- | 8.9 KB |
pwm-vt8500.c | -rw-r--r-- | 6.8 KB |
sysfs.c | -rw-r--r-- | 7.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...