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: Remove swake_up_one_online() bandaid

It's now ok to perform a wake-up from an offline CPU because the
resulting armed scheduler bandwidth hrtimers are now correctly targeted
by hrtimer infrastructure.

Remove the obsolete hackerry.

Link: https://lore.kernel.org/all/20241231170712.149394-3-frederic@kernel.org/
Reviewed-by: Usama Arif <usamaarif642@gmail.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>

authored by

Frederic Weisbecker and committed by
Joel Fernandes
0999f615 79b265a2

+3 -35
+1 -33
kernel/rcu/tree.c
··· 1060 1060 return needmore; 1061 1061 } 1062 1062 1063 - static void swake_up_one_online_ipi(void *arg) 1064 - { 1065 - struct swait_queue_head *wqh = arg; 1066 - 1067 - swake_up_one(wqh); 1068 - } 1069 - 1070 - static void swake_up_one_online(struct swait_queue_head *wqh) 1071 - { 1072 - int cpu = get_cpu(); 1073 - 1074 - /* 1075 - * If called from rcutree_report_cpu_starting(), wake up 1076 - * is dangerous that late in the CPU-down hotplug process. The 1077 - * scheduler might queue an ignored hrtimer. Defer the wake up 1078 - * to an online CPU instead. 1079 - */ 1080 - if (unlikely(cpu_is_offline(cpu))) { 1081 - int target; 1082 - 1083 - target = cpumask_any_and(housekeeping_cpumask(HK_TYPE_RCU), 1084 - cpu_online_mask); 1085 - 1086 - smp_call_function_single(target, swake_up_one_online_ipi, 1087 - wqh, 0); 1088 - put_cpu(); 1089 - } else { 1090 - put_cpu(); 1091 - swake_up_one(wqh); 1092 - } 1093 - } 1094 - 1095 1063 /* 1096 1064 * Awaken the grace-period kthread. Don't do a self-awaken (unless in an 1097 1065 * interrupt or softirq handler, in which case we just might immediately ··· 1084 1116 return; 1085 1117 WRITE_ONCE(rcu_state.gp_wake_time, jiffies); 1086 1118 WRITE_ONCE(rcu_state.gp_wake_seq, READ_ONCE(rcu_state.gp_seq)); 1087 - swake_up_one_online(&rcu_state.gp_wq); 1119 + swake_up_one(&rcu_state.gp_wq); 1088 1120 } 1089 1121 1090 1122 /*
+1 -1
kernel/rcu/tree_exp.h
··· 200 200 if (rnp->parent == NULL) { 201 201 raw_spin_unlock_irqrestore_rcu_node(rnp, flags); 202 202 if (wake) 203 - swake_up_one_online(&rcu_state.expedited_wq); 203 + swake_up_one(&rcu_state.expedited_wq); 204 204 205 205 break; 206 206 }
+1 -1
kernel/rcu/tree_nocb.h
··· 216 216 raw_spin_unlock_irqrestore(&rdp_gp->nocb_gp_lock, flags); 217 217 if (needwake) { 218 218 trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("DoWake")); 219 - swake_up_one_online(&rdp_gp->nocb_gp_wq); 219 + swake_up_one(&rdp_gp->nocb_gp_wq); 220 220 } 221 221 222 222 return needwake;