mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
rcu: Make synchronize_srcu_expedited() fast if running readers
The synchronize_srcu_expedited() function is currently quick if there are no active readers, but will delay a full jiffy if there are any. If these readers leave their SRCU read-side critical sections quickly, this is way too long to wait. So this commit first waits ten microseconds, and only then falls back to jiffy-at-a-time waiting. Reported-by: Avi Kivity <avi@redhat.com> Reported-by: Marcelo Tosatti <mtosatti@redhat.com> Tested-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
db3a892099
commit
46fdb0937f
2 changed files with 22 additions and 1 deletions
15
init/Kconfig
15
init/Kconfig
|
|
@ -488,6 +488,21 @@ config RCU_BOOST_DELAY
|
|||
|
||||
Accept the default if unsure.
|
||||
|
||||
config SRCU_SYNCHRONIZE_DELAY
|
||||
int "Microseconds to delay before waiting for readers"
|
||||
range 0 20
|
||||
default 10
|
||||
help
|
||||
This option controls how long SRCU delays before entering its
|
||||
loop waiting on SRCU readers. The purpose of this loop is
|
||||
to avoid the unconditional context-switch penalty that would
|
||||
otherwise be incurred if there was an active SRCU reader,
|
||||
in a manner similar to adaptive locking schemes. This should
|
||||
be set to be a bit longer than the common-case SRCU read-side
|
||||
critical-section overhead.
|
||||
|
||||
Accept the default if unsure.
|
||||
|
||||
endmenu # "RCU Subsystem"
|
||||
|
||||
config IKCONFIG
|
||||
|
|
|
|||
Loading…
Reference in a new issue