diff options
-rw-r--r-- | sys/kern/kern_sched.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_sched.c b/sys/kern/kern_sched.c index f566795dc60..9de421f037a 100644 --- a/sys/kern/kern_sched.c +++ b/sys/kern/kern_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sched.c,v 1.48 2018/06/19 19:29:52 kettenis Exp $ */ +/* $OpenBSD: kern_sched.c,v 1.49 2018/06/30 14:43:36 kettenis Exp $ */ /* * Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org> * @@ -471,6 +471,10 @@ sched_steal_proc(struct cpu_info *self) KASSERT((self->ci_schedstate.spc_schedflags & SPCF_SHOULDHALT) == 0); + /* Don't steal if we don't want to schedule processes in this CPU. */ + if (!cpuset_isset(&sched_all_cpus, self)) + return (NULL); + cpuset_copy(&set, &sched_queued_cpus); while ((ci = cpuset_first(&set)) != NULL) { |