android_kernel_xiaomi_sm8450/kernel/rcu
Paul E. McKenney 4f91de9a81 rcu-tasks: Simplify trc_read_check_handler() atomic operations
[ Upstream commit 96017bf9039763a2e02dcc6adaa18592cd73a39d ]

Currently, trc_wait_for_one_reader() atomically increments
the trc_n_readers_need_end counter before sending the IPI
invoking trc_read_check_handler().  All failure paths out of
trc_read_check_handler() and also from the smp_call_function_single()
within trc_wait_for_one_reader() must carefully atomically decrement
this counter.  This is more complex than it needs to be.

This commit therefore simplifies things and saves a few lines of
code by dispensing with the atomic decrements in favor of having
trc_read_check_handler() do the atomic increment only in the success case.
In theory, this represents no change in functionality.

Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:44:18 +02:00
..
Kconfig rcu: Make TASKS_RUDE_RCU select IRQ_WORK 2022-06-09 10:20:51 +02:00
Kconfig.debug Merge branch 'strictgp.2020.08.24a' into HEAD 2020-09-03 09:47:42 -07:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu_segcblist.c rcu/segcblist: Prevent useless GP start if no CBs to accelerate 2020-09-03 09:39:59 -07:00
rcu_segcblist.h rcu: Remove kfree_rcu() special casing and lazy-callback handling 2020-01-24 10:24:31 -08:00
rcu.h srcu: Fix broken node geometry after early ssp init 2021-07-20 16:05:38 +02:00
rcuscale.c rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale 2023-07-27 08:43:35 +02:00
rcutorture.c rcutorture: Avoid problematic critical section nesting on PREEMPT_RT 2021-11-18 14:03:52 +01:00
refscale.c refscale: Move shutdown from wait_event() to wait_event_idle() 2023-05-30 12:57:47 +01:00
srcutiny.c srcu: Provide polling interfaces for Tiny SRCU grace periods 2021-09-03 10:09:30 +02:00
srcutree.c srcu: Provide polling interfaces for Tree SRCU grace periods 2021-09-03 10:09:29 +02:00
sync.c rcu/sync: Simplify the state machine 2019-05-28 09:05:23 -07:00
tasks.h rcu-tasks: Simplify trc_read_check_handler() atomic operations 2023-07-27 08:44:18 +02:00
tiny.c rcu: Rename *_kfree_callback/*_kfree_rcu_offset/kfree_call_* 2020-06-29 11:59:25 -07:00
tree_exp.h rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access 2023-05-30 12:57:47 +01:00
tree_plugin.h rcu: Don't deboost before reporting expedited quiescent state 2022-03-28 09:57:10 +02:00
tree_stall.h rcu: Fix stall-warning deadlock due to non-release of rcu_node ->lock 2021-09-15 09:50:28 +02:00
tree.c rcu/kvfree: Avoid freeing new kfree_rcu() memory after old grace period 2023-06-21 15:45:40 +02:00
tree.h rcu: Prevent lockdep-RCU splats on lock acquisition/release 2023-01-14 10:16:29 +01:00
update.c rcu: Reject RCU_LOCKDEP_WARN() false positives 2021-07-20 16:05:38 +02:00