Skip to content

Commit 0999f61

Browse files
Frederic WeisbeckerJoel Fernandes
authored andcommitted
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/[email protected]/ Reviewed-by: Usama Arif <[email protected]> Reviewed-by: Joel Fernandes <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Signed-off-by: Joel Fernandes <[email protected]>
1 parent 79b265a commit 0999f61

File tree

3 files changed

+3
-35
lines changed

3 files changed

+3
-35
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,38 +1060,6 @@ static bool rcu_future_gp_cleanup(struct rcu_node *rnp)
10601060
return needmore;
10611061
}
10621062

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-
10951063
/*
10961064
* Awaken the grace-period kthread. Don't do a self-awaken (unless in an
10971065
* interrupt or softirq handler, in which case we just might immediately
@@ -1116,7 +1084,7 @@ static void rcu_gp_kthread_wake(void)
11161084
return;
11171085
WRITE_ONCE(rcu_state.gp_wake_time, jiffies);
11181086
WRITE_ONCE(rcu_state.gp_wake_seq, READ_ONCE(rcu_state.gp_seq));
1119-
swake_up_one_online(&rcu_state.gp_wq);
1087+
swake_up_one(&rcu_state.gp_wq);
11201088
}
11211089

11221090
/*

kernel/rcu/tree_exp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static void __rcu_report_exp_rnp(struct rcu_node *rnp,
200200
if (rnp->parent == NULL) {
201201
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
202202
if (wake)
203-
swake_up_one_online(&rcu_state.expedited_wq);
203+
swake_up_one(&rcu_state.expedited_wq);
204204

205205
break;
206206
}

kernel/rcu/tree_nocb.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static bool __wake_nocb_gp(struct rcu_data *rdp_gp,
216216
raw_spin_unlock_irqrestore(&rdp_gp->nocb_gp_lock, flags);
217217
if (needwake) {
218218
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);
220220
}
221221

222222
return needwake;

0 commit comments

Comments
 (0)