Skip to content
Commit 058d62a0 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Greg Kroah-Hartman
Browse files

rcu: Don't deboost before reporting expedited quiescent state

commit 10c53578

 upstream.

Currently rcu_preempt_deferred_qs_irqrestore() releases rnp->boost_mtx
before reporting the expedited quiescent state.  Under heavy real-time
load, this can result in this function being preempted before the
quiescent state is reported, which can in turn prevent the expedited grace
period from completing.  Tim Murray reports that the resulting expedited
grace periods can take hundreds of milliseconds and even more than one
second, when they should normally complete in less than a millisecond.

This was fine given that there were no particular response-time
constraints for synchronize_rcu_expedited(), as it was designed
for throughput rather than latency.  However, some users now need
sub-100-millisecond response-time constratints.

This patch therefore follows Neeraj's suggestion (seconded by Tim and
by Uladzislau Rezki) of simply reversing the two operations.

Reported-by: default avatarTim Murray <timmurray@google.com>
Reported-by: default avatarJoel Fernandes <joelaf@google.com>
Reported-by: default avatarNeeraj Upadhyay <quic_neeraju@quicinc.com>
Reviewed-by: default avatarNeeraj Upadhyay <quic_neeraju@quicinc.com>
Reviewed-by: default avatarUladzislau Rezki (Sony) <urezki@gmail.com>
Tested-by: default avatarTim Murray <timmurray@google.com>
Cc: Todd Kjos <tkjos@google.com>
Cc: Sandeep Patil <sspatil@google.com>
Cc: <stable@vger.kernel.org> # 5.4.x
Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b094fece
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment