mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-04 17:15:50 +00:00
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 it's very first timeslice, and td_lastcpu will be NOCPU in that case. MFC after: 1 week
This commit is contained in:
parent
c917a54b26
commit
e2325d8285
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303503
@ -1241,7 +1241,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user