Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5db35673 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Paul E. McKenney
Browse files

rcu: ignore offline CPUs in last non-dyntick-idle CPU check



Offline CPUs are not in nohz_cpu_mask, but can be ignored when checking
for the last non-dyntick-idle CPU.  This patch therefore only checks
online CPUs for not being dyntick idle, allowing fast entry into
full-system dyntick-idle state even when there are some offline CPUs.

Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 0c34029a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1016,7 +1016,7 @@ int rcu_needs_cpu(int cpu)

	/* Don't bother unless we are the last non-dyntick-idle CPU. */
	for_each_cpu_not(thatcpu, nohz_cpu_mask)
		if (thatcpu != cpu) {
		if (cpu_online(thatcpu) && thatcpu != cpu) {
			per_cpu(rcu_dyntick_drain, cpu) = 0;
			per_cpu(rcu_dyntick_holdoff, cpu) = jiffies - 1;
			return rcu_needs_cpu_quick_check(cpu);