]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched/fair: Robustify CFS-bandwidth timer locking
authorPeter Zijlstra <peterz@infradead.org>
Mon, 7 Jan 2019 12:52:31 +0000 (13:52 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 27 Jan 2019 11:29:37 +0000 (12:29 +0100)
commitc0ad4aa4d8416a39ad262a2bd68b30acd951bf0e
treeef0c001f3783a68146915eb3fff67d08f800b5b7
parentf8a696f25ba09a1821dc6ca3db56f41c264fb896
sched/fair: Robustify CFS-bandwidth timer locking

Traditionally hrtimer callbacks were run with IRQs disabled, but with
the introduction of HRTIMER_MODE_SOFT it is possible they run from
SoftIRQ context, which does _NOT_ have IRQs disabled.

Allow for the CFS bandwidth timers (period_timer and slack_timer) to
be ran from SoftIRQ context; this entails removing the assumption that
IRQs are already disabled from the locking.

While mainline doesn't strictly need this, -RT forces all timers not
explicitly marked with MODE_HARD into MODE_SOFT and trips over this.
And marking these timers as MODE_HARD doesn't make sense as they're
not required for RT operation and can potentially be quite expensive.

Reported-by: Tom Putzeys <tom.putzeys@be.atlascopco.com>
Tested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190107125231.GE14122@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c