]> git.baikalelectronics.ru Git - kernel.git/commit
srcu: Block less aggressively for expedited grace periods
authorPaul E. McKenney <paulmck@kernel.org>
Sun, 12 Jun 2022 22:00:06 +0000 (15:00 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Tue, 19 Jul 2022 18:39:59 +0000 (11:39 -0700)
commit98b98e9623c143ffe7b5a6001177b74dcfd71d38
treeeac82d9f1b94aa700ec5514c378569c8062b9cc3
parent08aafa0d475a08e31a13403e9df41c7179f4bdcd
srcu: Block less aggressively for expedited grace periods

Commit 89ab6c3af159 ("srcu: Prevent expedited GPs and blocking readers
from consuming CPU") fixed a problem where a long-running expedited SRCU
grace period could block kernel live patching.  It did so by giving up
on expediting once a given SRCU expedited grace period grew too old.

Unfortunately, this added excessive delays to boots of virtual embedded
systems specifying "-bios QEMU_EFI.fd" to qemu.  This commit therefore
makes the transition away from expediting less aggressive, increasing
the per-grace-period phase number of non-sleeping polls of readers from
one to three and increasing the required grace-period age from one jiffy
(actually from zero to one jiffies) to two jiffies (actually from one
to two jiffies).

Fixes: 89ab6c3af159 ("srcu: Prevent expedited GPs and blocking readers from consuming CPU")
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reported-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Reported-by: chenxiang (M)" <chenxiang66@hisilicon.com>
Cc: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Link: https://lore.kernel.org/all/20615615-0013-5adc-584f-2b1d5c03ebfc@linaro.org/
kernel/rcu/srcutree.c