Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1728262
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] sched: WARN when migrating to an offline CPU |
| Date | 2017-09-07 17:20 +0200 |
| Message-ID | <un6L0-1Qb-17@gated-at.bofh.it> (permalink) |
| References | <un6L0-1Qb-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Migrating tasks to offline CPUs is a pretty big fail, warn about it. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> --- kernel/sched/core.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1173,6 +1173,10 @@ void set_task_cpu(struct task_struct *p, WARN_ON_ONCE(debug_locks && !(lockdep_is_held(&p->pi_lock) || lockdep_is_held(&task_rq(p)->lock))); #endif + /* + * Clearly, migrating tasks to offline CPUs is a fairly daft thing. + */ + WARN_ON_ONCE(!cpu_online(new_cpu)); #endif trace_sched_migrate_task(p, new_cpu);
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3/4] sched: WARN when migrating to an offline CPU Peter Zijlstra <peterz@infradead.org> - 2017-09-07 17:20 +0200
csiph-web