diff options
author | jhb <jhb@FreeBSD.org> | 2010-08-06 15:36:59 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-08-06 15:36:59 +0000 |
commit | 19ddbf5c3845e0aaeed327e2be2f168e30013b63 (patch) | |
tree | 90823b92f30822fa8ac56ad8c70614f9aae1017a /sys/kern/sched_ule.c | |
parent | 57b610d580a3dd85aaac28dae65ce416f30c3f31 (diff) | |
download | FreeBSD-src-19ddbf5c3845e0aaeed327e2be2f168e30013b63.zip FreeBSD-src-19ddbf5c3845e0aaeed327e2be2f168e30013b63.tar.gz |
Add a new ipi_cpu() function to the MI IPI API that can be used to send an
IPI to a specific CPU by its cpuid. Replace calls to ipi_selected() that
constructed a mask for a single CPU with calls to ipi_cpu() instead. This
will matter more in the future when we transition from cpumask_t to
cpuset_t for CPU masks in which case building a CPU mask is more expensive.
Submitted by: peter, sbruno
Reviewed by: rookie
Obtained from: Yahoo! (x86)
MFC after: 1 month
Diffstat (limited to 'sys/kern/sched_ule.c')
-rw-r--r-- | sys/kern/sched_ule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index f469a06b1..e210ebc 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -851,7 +851,7 @@ sched_balance_pair(struct tdq *high, struct tdq *low) * IPI the target cpu to force it to reschedule with the new * workload. */ - ipi_selected(1 << TDQ_ID(low), IPI_PREEMPT); + ipi_cpu(TDQ_ID(low), IPI_PREEMPT); } tdq_unlock_pair(high, low); return (moved); @@ -974,7 +974,7 @@ tdq_notify(struct tdq *tdq, struct thread *td) return; } tdq->tdq_ipipending = 1; - ipi_selected(1 << cpu, IPI_PREEMPT); + ipi_cpu(cpu, IPI_PREEMPT); } /* @@ -2411,7 +2411,7 @@ sched_affinity(struct thread *td) cpu = ts->ts_cpu; ts->ts_cpu = sched_pickcpu(td, 0); if (cpu != PCPU_GET(cpuid)) - ipi_selected(1 << cpu, IPI_PREEMPT); + ipi_cpu(cpu, IPI_PREEMPT); #endif } |