1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

- We do need to IPI the idlethread on some systems. It may be stuck in

a power saving mode otherwise.
 - If the thread is already bound in sched_bind() unbind it before
   re-binding it to a new cpu.  I don't like these semantics but they are
   expected by some code in the tree.  Patch by jkoshy.
This commit is contained in:
Jeff Roberson 2007-01-20 17:03:33 +00:00
parent d071f5048c
commit c95d2db298
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166152

View File

@ -724,12 +724,6 @@ tdq_notify(struct td_sched *ts)
*/
if (prio > ipi_thresh && td->td_priority < PRI_MIN_IDLE)
return;
/*
* The idlethread finds new work via sched_runnable(), don't IPI
* here.
*/
if (td == pcpu->pc_idlethread)
return;
if (ipi_ast)
ipi_selected(1 << cpu, IPI_AST);
else if (ipi_preempt)
@ -1925,7 +1919,7 @@ sched_bind(struct thread *td, int cpu)
mtx_assert(&sched_lock, MA_OWNED);
ts = td->td_sched;
if (ts->ts_flags & TSF_BOUND)
return;
sched_unbind(td);
ts->ts_flags |= TSF_BOUND;
#ifdef SMP
sched_pin();