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-- 12.4 KB
Makefile -rw-r--r-- 2.4 KB
altera_edac.c -rw-r--r-- 26.8 KB
altera_edac.h -rw-r--r-- 6.0 KB
amd64_edac.c -rw-r--r-- 77.7 KB
amd64_edac.h -rw-r--r-- 13.0 KB
amd64_edac_dbg.c -rw-r--r-- 1.5 KB
amd64_edac_inj.c -rw-r--r-- 6.2 KB
amd76x_edac.c -rw-r--r-- 9.4 KB
amd8111_edac.c -rw-r--r-- 16.5 KB
amd8111_edac.h -rw-r--r-- 4.1 KB
amd8131_edac.c -rw-r--r-- 10.7 KB
amd8131_edac.h -rw-r--r-- 3.7 KB
cell_edac.c -rw-r--r-- 7.7 KB
cpc925_edac.c -rw-r--r-- 31.7 KB
debugfs.c -rw-r--r-- 4.0 KB
e752x_edac.c -rw-r--r-- 40.8 KB
e7xxx_edac.c -rw-r--r-- 16.2 KB
edac_core.h -rw-r--r-- 14.3 KB
edac_device.c -rw-r--r-- 19.4 KB
edac_device_sysfs.c -rw-r--r-- 23.2 KB
edac_mc.c -rw-r--r-- 32.8 KB
edac_mc_sysfs.c -rw-r--r-- 26.2 KB
edac_module.c -rw-r--r-- 3.3 KB
edac_module.h -rw-r--r-- 4.5 KB
edac_pci.c -rw-r--r-- 9.4 KB
edac_pci_sysfs.c -rw-r--r-- 19.1 KB
edac_stub.c -rw-r--r-- 1.6 KB
ghes_edac.c -rw-r--r-- 13.6 KB
highbank_l2_edac.c -rw-r--r-- 4.0 KB
highbank_mc_edac.c -rw-r--r-- 7.5 KB
i3000_edac.c -rw-r--r-- 13.8 KB
i3200_edac.c -rw-r--r-- 12.8 KB
i5000_edac.c -rw-r--r-- 42.3 KB
i5100_edac.c -rw-r--r-- 30.3 KB
i5400_edac.c -rw-r--r-- 40.0 KB
i7300_edac.c -rw-r--r-- 35.3 KB
i7core_edac.c -rw-r--r-- 63.1 KB
i82443bxgx_edac.c -rw-r--r-- 13.6 KB
i82860_edac.c -rw-r--r-- 9.2 KB
i82875p_edac.c -rw-r--r-- 14.7 KB
i82975x_edac.c -rw-r--r-- 18.3 KB
ie31200_edac.c -rw-r--r-- 14.3 KB
mce_amd.c -rw-r--r-- 25.8 KB
mce_amd.h -rw-r--r-- 1.7 KB
mpc85xx_edac.c -rw-r--r-- 34.9 KB
mpc85xx_edac.h -rw-r--r-- 4.9 KB
mv64x60_edac.c -rw-r--r-- 21.9 KB
mv64x60_edac.h -rw-r--r-- 3.2 KB
octeon_edac-l2c.c -rw-r--r-- 5.3 KB
octeon_edac-lmc.c -rw-r--r-- 8.5 KB
octeon_edac-pc.c -rw-r--r-- 3.5 KB
octeon_edac-pci.c -rw-r--r-- 2.7 KB
pasemi_edac.c -rw-r--r-- 8.6 KB
ppc4xx_edac.c -rw-r--r-- 39.4 KB
ppc4xx_edac.h -rw-r--r-- 7.2 KB
r82600_edac.c -rw-r--r-- 11.8 KB
sb_edac.c -rw-r--r-- 94.7 KB
synopsys_edac.c -rw-r--r-- 13.4 KB
tile_edac.c -rw-r--r-- 6.4 KB
wq.c -rw-r--r-- 772 bytes
x38_edac.c -rw-r--r-- 12.0 KB
xgene_edac.c -rw-r--r-- 59.8 KB

back to top