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
altera-stapl
c2port
cb710
cxl
echo
eeprom
genwqe
ibmasm
lis3lv02d
mei
mic
sgi-gru
sgi-xp
ti-st
vmw_vmci
Kconfig -rw-r--r-- 29.0 KB
Makefile -rw-r--r-- 2.2 KB
ad525x_dpot-i2c.c -rw-r--r-- 2.6 KB
ad525x_dpot-spi.c -rw-r--r-- 2.8 KB
ad525x_dpot.c -rw-r--r-- 20.1 KB
ad525x_dpot.h -rw-r--r-- 7.9 KB
apds9802als.c -rw-r--r-- 7.6 KB
apds990x.c -rw-r--r-- 33.9 KB
arm-charlcd.c -rw-r--r-- 8.8 KB
atmel-ssc.c -rw-r--r-- 5.1 KB
atmel_tclib.c -rw-r--r-- 4.5 KB
bh1770glc.c -rw-r--r-- 37.5 KB
bh1780gli.c -rw-r--r-- 6.1 KB
bmp085-i2c.c -rw-r--r-- 2.2 KB
bmp085-spi.c -rw-r--r-- 2.1 KB
bmp085.c -rw-r--r-- 13.3 KB
bmp085.h -rw-r--r-- 1.1 KB
cs5535-mfgpt.c -rw-r--r-- 10.2 KB
ds1682.c -rw-r--r-- 6.6 KB
dummy-irq.c -rw-r--r-- 1.5 KB
enclosure.c -rw-r--r-- 18.7 KB
fsa9480.c -rw-r--r-- 12.8 KB
hmc6352.c -rw-r--r-- 4.0 KB
hpilo.c -rw-r--r-- 21.6 KB
hpilo.h -rw-r--r-- 5.7 KB
ics932s401.c -rw-r--r-- 13.2 KB
ioc4.c -rw-r--r-- 14.3 KB
isl29003.c -rw-r--r-- 11.6 KB
isl29020.c -rw-r--r-- 5.5 KB
kgdbts.c -rw-r--r-- 30.6 KB
lattice-ecp3-config.c -rw-r--r-- 5.9 KB
lkdtm.c -rw-r--r-- 23.2 KB
panel.c -rw-r--r-- 61.4 KB
pch_phub.c -rw-r--r-- 27.5 KB
phantom.c -rw-r--r-- 13.2 KB
pti.c -rw-r--r-- 26.4 KB
qcom-coincell.c -rw-r--r-- 4.0 KB
spear13xx_pcie_gadget.c -rw-r--r-- 19.9 KB
sram.c -rw-r--r-- 10.2 KB
ti_dac7512.c -rw-r--r-- 2.5 KB
tifm_7xx1.c -rw-r--r-- 11.0 KB
tifm_core.c -rw-r--r-- 8.3 KB
tsl2550.c -rw-r--r-- 10.5 KB
vexpress-syscfg.c -rw-r--r-- 7.1 KB
vmw_balloon.c -rw-r--r-- 33.8 KB

back to top