Re: [PATCH RESEND 1/1] sched/rt: minimize rq->lock contention in, do_sched_rt_period_timer()

From: Peter Zijlstra
Date: Tue May 16 2017 - 04:15:09 EST

On Mon, May 15, 2017 at 02:14:13PM -0500, Dave Kleikamp wrote:
> With CONFIG_RT_GROUP_SCHED defined, 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.

Indeed, thanks Dave!