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-- 11.9 KB
Makefile -rw-r--r-- 2.7 KB
phy-armada375-usb2.c -rw-r--r-- 4.3 KB
phy-bcm-cygnus-pcie.c -rw-r--r-- 5.1 KB
phy-bcm-kona-usb2.c -rw-r--r-- 3.8 KB
phy-berlin-sata.c -rw-r--r-- 7.2 KB
phy-berlin-usb.c -rw-r--r-- 6.1 KB
phy-brcmstb-sata.c -rw-r--r-- 6.4 KB
phy-core.c -rw-r--r-- 22.6 KB
phy-dm816x-usb.c -rw-r--r-- 7.5 KB
phy-exynos-dp-video.c -rw-r--r-- 3.4 KB
phy-exynos-mipi-video.c -rw-r--r-- 5.2 KB
phy-exynos4210-usb2.c -rw-r--r-- 7.0 KB
phy-exynos4x12-usb2.c -rw-r--r-- 10.5 KB
phy-exynos5-usbdrd.c -rw-r--r-- 20.8 KB
phy-exynos5250-sata.c -rw-r--r-- 6.9 KB
phy-exynos5250-usb2.c -rw-r--r-- 12.8 KB
phy-hi6220-usb.c -rw-r--r-- 4.1 KB
phy-hix5hd2-sata.c -rw-r--r-- 5.3 KB
phy-lpc18xx-usb-otg.c -rw-r--r-- 3.4 KB
phy-miphy28lp.c -rw-r--r-- 33.4 KB
phy-miphy365x.c -rw-r--r-- 15.9 KB
phy-mt65xx-usb3.c -rw-r--r-- 17.4 KB
phy-mvebu-sata.c -rw-r--r-- 3.4 KB
phy-omap-control.c -rw-r--r-- 9.5 KB
phy-omap-usb2.c -rw-r--r-- 10.8 KB
phy-pistachio-usb.c -rw-r--r-- 5.2 KB
phy-pxa-28nm-hsic.c -rw-r--r-- 5.8 KB
phy-pxa-28nm-usb2.c -rw-r--r-- 9.7 KB
phy-qcom-apq8064-sata.c -rw-r--r-- 8.5 KB
phy-qcom-ipq806x-sata.c -rw-r--r-- 6.5 KB
phy-qcom-ufs-i.h -rw-r--r-- 4.8 KB
phy-qcom-ufs-qmp-14nm.c -rw-r--r-- 5.3 KB
phy-qcom-ufs-qmp-14nm.h -rw-r--r-- 8.2 KB
phy-qcom-ufs-qmp-20nm.c -rw-r--r-- 6.8 KB
phy-qcom-ufs-qmp-20nm.h -rw-r--r-- 11.2 KB
phy-qcom-ufs.c -rw-r--r-- 18.8 KB
phy-rcar-gen2.c -rw-r--r-- 8.2 KB
phy-rcar-gen3-usb2.c -rw-r--r-- 8.4 KB
phy-rockchip-dp.c -rw-r--r-- 3.7 KB
phy-rockchip-emmc.c -rw-r--r-- 6.1 KB
phy-rockchip-usb.c -rw-r--r-- 12.5 KB
phy-s5pv210-usb2.c -rw-r--r-- 4.4 KB
phy-samsung-usb2.c -rw-r--r-- 6.5 KB
phy-samsung-usb2.h -rw-r--r-- 1.9 KB
phy-spear1310-miphy.c -rw-r--r-- 7.6 KB
phy-spear1340-miphy.c -rw-r--r-- 8.1 KB
phy-stih407-usb.c -rw-r--r-- 4.8 KB
phy-stih41x-usb.c -rw-r--r-- 4.7 KB
phy-sun4i-usb.c -rw-r--r-- 20.0 KB
phy-sun9i-usb.c -rw-r--r-- 5.0 KB
phy-ti-pipe3.c -rw-r--r-- 17.5 KB
phy-tusb1210.c -rw-r--r-- 3.5 KB
phy-twl4030-usb.c -rw-r--r-- 21.6 KB
phy-xgene.c -rw-r--r-- 59.8 KB
ulpi_phy.h -rw-r--r-- 744 bytes

back to top