]> www.infradead.org Git - users/willy/xarray.git/commit
rcuscale: Count outstanding callbacks per-task rather than per-CPU
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 2 Aug 2024 00:43:08 +0000 (17:43 -0700)
committerNeeraj Upadhyay <neeraj.upadhyay@kernel.org>
Wed, 14 Aug 2024 18:44:48 +0000 (00:14 +0530)
commitf1fd0e0bb12d09ca0564425b8af76fddf2e380fb
treeb375c076ebaa30825e2c4043a9d3b44399ee9aea
parent554f07a119866a78606b36123fb28e9451b1f994
rcuscale: Count outstanding callbacks per-task rather than per-CPU

The current rcu_scale_writer() asynchronous grace-period testing uses a
per-CPU counter to track the number of outstanding callbacks.  This is
subject to CPU-imbalance errors when tasks migrate from one CPU to another
between the time that the counter is incremented and the callback is
queued, and additionally in kernels configured such that callbacks can
be invoked on some CPU other than the one that queued it.

This commit therefore arranges for per-task callback counts, thus avoiding
any issues with migration of either tasks or callbacks.

Reported-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: "Paul E. McKenney" <paulmck@kernel.org>
Signed-off-by: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
kernel/rcu/rcuscale.c