Skip to content

Commit 448e9f3

Browse files
author
Frederic Weisbecker
committed
rcu: Standardize explicit CPU-hotplug calls
rcu_report_dead() and rcutree_migrate_callbacks() have their headers in rcupdate.h while those are pure rcutree calls, like the other CPU-hotplug functions. Also rcu_cpu_starting() and rcu_report_dead() have different naming conventions while they mirror each other's effects. Fix the headers and propose a naming that relates both functions and aligns with the prefix of other rcutree CPU-hotplug functions. Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
1 parent 2cb1f6e commit 448e9f3

File tree

15 files changed

+33
-26
lines changed

15 files changed

+33
-26
lines changed

Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ operations is carried out at several levels:
181181
of this wait (or series of waits, as the case may be) is to permit a
182182
concurrent CPU-hotplug operation to complete.
183183
#. In the case of RCU-sched, one of the last acts of an outgoing CPU is
184-
to invoke ``rcu_report_dead()``, which reports a quiescent state for
184+
to invoke ``rcutree_report_cpu_dead()``, which reports a quiescent state for
185185
that CPU. However, this is likely paranoia-induced redundancy.
186186

187187
+-----------------------------------------------------------------------+

Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp-fqs.svg

Lines changed: 2 additions & 2 deletions
Loading

Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp.svg

Lines changed: 2 additions & 2 deletions
Loading

Documentation/RCU/Design/Memory-Ordering/TreeRCU-hotplug.svg

Lines changed: 2 additions & 2 deletions
Loading

Documentation/RCU/Design/Requirements/Requirements.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,12 +1955,12 @@ if offline CPUs block an RCU grace period for too long.
19551955

19561956
An offline CPU's quiescent state will be reported either:
19571957

1958-
1. As the CPU goes offline using RCU's hotplug notifier (rcu_report_dead()).
1958+
1. As the CPU goes offline using RCU's hotplug notifier (rcutree_report_cpu_dead()).
19591959
2. When grace period initialization (rcu_gp_init()) detects a
19601960
race either with CPU offlining or with a task unblocking on a leaf
19611961
``rcu_node`` structure whose CPUs are all offline.
19621962

1963-
The CPU-online path (rcu_cpu_starting()) should never need to report
1963+
The CPU-online path (rcutree_report_cpu_starting()) should never need to report
19641964
a quiescent state for an offline CPU. However, as a debugging measure,
19651965
it does emit a warning if a quiescent state was not already reported
19661966
for that CPU.

arch/arm64/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ asmlinkage notrace void secondary_start_kernel(void)
215215
if (system_uses_irq_prio_masking())
216216
init_gic_priority_masking();
217217

218-
rcu_cpu_starting(cpu);
218+
rcutree_report_cpu_starting(cpu);
219219
trace_hardirqs_off();
220220

221221
/*
@@ -401,7 +401,7 @@ void __noreturn cpu_die_early(void)
401401

402402
/* Mark this CPU absent */
403403
set_cpu_present(cpu, 0);
404-
rcu_report_dead();
404+
rcutree_report_cpu_dead();
405405

406406
if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) {
407407
update_cpu_boot_status(CPU_KILL_ME);

arch/powerpc/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ void start_secondary(void *unused)
16291629

16301630
smp_store_cpu_info(cpu);
16311631
set_dec(tb_ticks_per_jiffy);
1632-
rcu_cpu_starting(cpu);
1632+
rcutree_report_cpu_starting(cpu);
16331633
cpu_callin_map[cpu] = 1;
16341634

16351635
if (smp_ops->setup_cpu)

arch/s390/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ static void smp_start_secondary(void *cpuvoid)
898898
S390_lowcore.restart_flags = 0;
899899
restore_access_regs(S390_lowcore.access_regs_save_area);
900900
cpu_init();
901-
rcu_cpu_starting(cpu);
901+
rcutree_report_cpu_starting(cpu);
902902
init_cpu_timer();
903903
vtime_init();
904904
vdso_getcpu_init();

arch/x86/kernel/smpboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static void notrace start_secondary(void *unused)
288288

289289
cpu_init();
290290
fpu__init_cpu();
291-
rcu_cpu_starting(raw_smp_processor_id());
291+
rcutree_report_cpu_starting(raw_smp_processor_id());
292292
x86_cpuinit.early_percpu_clock_init();
293293

294294
ap_starting();

include/linux/interrupt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ enum
566566
*
567567
* _ RCU:
568568
* 1) rcutree_migrate_callbacks() migrates the queue.
569-
* 2) rcu_report_dead() reports the final quiescent states.
569+
* 2) rcutree_report_cpu_dead() reports the final quiescent states.
570570
*
571571
* _ IRQ_POLL: irq_poll_cpu_dead() migrates the queue
572572
*/

0 commit comments

Comments
 (0)