diff options
author | jeff <jeff@FreeBSD.org> | 2007-01-20 17:03:33 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-01-20 17:03:33 +0000 |
commit | a1996060b3e7be31b8b5135cf2deddda8512fae1 (patch) | |
tree | ff01dd9ffcdb06d4dad2a4c7da7158499409a800 /sys | |
parent | 42392e7a0b343fe5280991684011be7f99879d3f (diff) | |
download | FreeBSD-src-a1996060b3e7be31b8b5135cf2deddda8512fae1.zip FreeBSD-src-a1996060b3e7be31b8b5135cf2deddda8512fae1.tar.gz |
- 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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sched_ule.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index cbec5c5..af9ddc6 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -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(); |