]> git.baikalelectronics.ru Git - kernel.git/commit
rcu-tasks: Merge state into .b.need_qs and atomically update
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 24 May 2022 03:50:11 +0000 (20:50 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:22:27 +0000 (09:22 -0700)
commit4bb4b4bb7ebf2d09196433945115e4ffdb8be2d7
treef2ff9588ddb2952f984004b86368b694b24300a8
parentd4b9725e59b42485e922b8cf1cd9f35718f34035
rcu-tasks: Merge state into .b.need_qs and atomically update

This commit gets rid of the task_struct structure's ->trc_reader_checked
field, making it instead be a bit within the task_struct structure's
existing ->trc_reader_special.b.need_qs field.  This commit also
atomically loads, stores, and checks the resulting combination of the
reader-checked and need-quiescent state flags.  This will in turn allow
significant simplification of the rcu_tasks_trace_postgp() function
as well as elimination of the trc_n_readers_need_end counter in later
commits.  These changes will in turn simplify later elimination of the
RCU Tasks Trace scan of the task list, which will make RCU Tasks Trace
grace periods less CPU-intensive.

[ paulmck: Apply kernel test robot feedback. ]

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: KP Singh <kpsingh@kernel.org>
include/linux/rcupdate.h
include/linux/sched.h
kernel/rcu/tasks.h