svn commit: r303885 - in stable: 10/sys/kern 9/sys/kern
John Baldwin
jhb at FreeBSD.org
Tue Aug 9 18:59:17 UTC 2016
Author: jhb
Date: Tue Aug 9 18:59:16 2016
New Revision: 303885
URL: https://svnweb.freebsd.org/changeset/base/303885
Log:
MFC 303503: Don't treat NOCPU as a valid CPU to CPU_ISSET.
If a thread is created bound to a cpuset it might already be bound before
its very first timeslice, and td_lastcpu will be NOCPU in that case.
Modified:
stable/9/sys/kern/sched_4bsd.c
Directory Properties:
stable/9/sys/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/10/sys/kern/sched_4bsd.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/9/sys/kern/sched_4bsd.c
==============================================================================
--- stable/9/sys/kern/sched_4bsd.c Tue Aug 9 18:56:29 2016 (r303884)
+++ stable/9/sys/kern/sched_4bsd.c Tue Aug 9 18:59:16 2016 (r303885)
@@ -1235,7 +1235,7 @@ sched_pickcpu(struct thread *td)
mtx_assert(&sched_lock, MA_OWNED);
- if (THREAD_CAN_SCHED(td, td->td_lastcpu))
+ if (td->td_lastcpu != NOCPU && THREAD_CAN_SCHED(td, td->td_lastcpu))
best = td->td_lastcpu;
else
best = NOCPU;
More information about the svn-src-stable-9
mailing list