]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched/rt: Minimize rq->lock contention in do_sched_rt_period_timer() v4.1.12-102.0.20170530_1700
authorDave Kleikamp <dave.kleikamp@oracle.com>
Mon, 15 May 2017 19:14:13 +0000 (14:14 -0500)
committerShannon Nelson <shannon.nelson@oracle.com>
Wed, 31 May 2017 23:43:53 +0000 (16:43 -0700)
commitcc090307633578c137d7905e64abd07820d7b6e8
tree22419a7c627cc81ea7c75d0ca53bc98bcbb4a566
parentf7fef3fdf4af3073f99d44dca39ff810b1f3cded
sched/rt: Minimize rq->lock contention in do_sched_rt_period_timer()

With CONFIG_RT_GROUP_SCHED=y, do_sched_rt_period_timer() sequentially
takes each CPU's rq->lock. On a large, busy system, the cumulative time it
takes to acquire each lock can be excessive, even triggering a watchdog
timeout.

If rt_rq->rt_time and rt_rq->rt_nr_running are both zero, this function does
nothing while holding the lock, so don't bother taking it at all.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/a767637b-df85-912f-ba69-c90ee00a3fb6@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Orabug: 25491970

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
kernel/sched/rt.c