Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rcu-tasks: Remove unnecessary smp_store_release() in cblist_init_generic()

The cblist_init_generic() is executed during the CPU early boot
phase due to commit:30ef09635b9e ("rcu-tasks: Initialize callback
lists at rcu_init() time"), at this time, only one boot CPU is
online and the irq is disabled. this commit therefore use routine
assignment replace of smp_store_release() and WRITE_ONCE() in the
cblist_init_generic().

Signed-off-by: Zqiang <qiang.zhang@linux.dev>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>

authored by

Zqiang and committed by
Joel Fernandes
3e3d7d8f 6c3d9ad7

+3 -3
+3 -3
kernel/rcu/tasks.h
··· 291 291 shift = ilog2(rcu_task_cpu_ids / lim); 292 292 if (((rcu_task_cpu_ids - 1) >> shift) >= lim) 293 293 shift++; 294 - WRITE_ONCE(rtp->percpu_enqueue_shift, shift); 295 - WRITE_ONCE(rtp->percpu_dequeue_lim, lim); 296 - smp_store_release(&rtp->percpu_enqueue_lim, lim); 294 + rtp->percpu_enqueue_shift = shift; 295 + rtp->percpu_dequeue_lim = lim; 296 + rtp->percpu_enqueue_lim = lim; 297 297 298 298 pr_info("%s: Setting shift to %d and lim to %d rcu_task_cb_adjust=%d rcu_task_cpu_ids=%d.\n", 299 299 rtp->name, data_race(rtp->percpu_enqueue_shift), data_race(rtp->percpu_enqueue_lim),