History

sched/core: WARN() when migrating to an offline CPU

Migrating tasks to offline CPUs is a pretty big fail, warn about it.

Peter Zijlstra committed 9 years ago

Commit 4ff90831 parent edd8e411 file · +4 −0Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/sched/core.c+4−0
@@ -1173,6 +1173,10 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu) · 1172 unmodified lines
1173 WARN_ON_ONCE(debug_locks && !(lockdep_is_held(&p->pi_lock) ||1173 WARN_ON_ONCE(debug_locks && !(lockdep_is_held(&p->pi_lock) ||
1174 lockdep_is_held(&task_rq(p)->lock)));1174 lockdep_is_held(&task_rq(p)->lock)));
1175#endif1175#endif
1176 /*
1177 * Clearly, migrating tasks to offline CPUs is a fairly daft thing.
1178 */
1179 WARN_ON_ONCE(!cpu_online(new_cpu));
1176#endif1180#endif
1177 1181
1178 trace_sched_migrate_task(p, new_cpu);1182 trace_sched_migrate_task(p, new_cpu);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t