We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1fc648 commit 7537b90Copy full SHA for 7537b90
kernel/sched/core.c
@@ -1097,25 +1097,22 @@ int get_nohz_timer_target(void)
1097
1098
hk_mask = housekeeping_cpumask(HK_TYPE_TIMER);
1099
1100
- rcu_read_lock();
+ guard(rcu)();
1101
+
1102
for_each_domain(cpu, sd) {
1103
for_each_cpu_and(i, sched_domain_span(sd), hk_mask) {
1104
if (cpu == i)
1105
continue;
1106
- if (!idle_cpu(i)) {
1107
- cpu = i;
1108
- goto unlock;
1109
- }
+ if (!idle_cpu(i))
+ return i;
1110
}
1111
1112
1113
if (default_cpu == -1)
1114
default_cpu = housekeeping_any_cpu(HK_TYPE_TIMER);
1115
- cpu = default_cpu;
1116
-unlock:
1117
- rcu_read_unlock();
1118
- return cpu;
+ return default_cpu;
1119
1120
1121
/*
0 commit comments