summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_smp.c
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2004-08-13 00:57:43 +0000
committerjulian <julian@FreeBSD.org>2004-08-13 00:57:43 +0000
commit9ab7967d3cca5c6250f1504cbec7fa644968d652 (patch)
tree9597905beaeaeca41e8e113464a69cbe2e11f9d7 /sys/kern/subr_smp.c
parent622c9da9954764eb4d2fcf7f9c455ef546e6dcdd (diff)
downloadFreeBSD-src-9ab7967d3cca5c6250f1504cbec7fa644968d652.zip
FreeBSD-src-9ab7967d3cca5c6250f1504cbec7fa644968d652.tar.gz
Don't keep evaluating our own cpu mask..
it's not likely to have changed....
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r--sys/kern/subr_smp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index 8ed6885..b1be3fa 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -172,7 +172,7 @@ forward_roundrobin(void)
{
struct pcpu *pc;
struct thread *td;
- cpumask_t id, map;
+ cpumask_t id, map, me;
mtx_assert(&sched_lock, MA_OWNED);
@@ -183,10 +183,11 @@ forward_roundrobin(void)
if (!forward_roundrobin_enabled)
return;
map = 0;
+ me = PCPU_GET(cpumask);
SLIST_FOREACH(pc, &cpuhead, pc_allcpu) {
td = pc->pc_curthread;
id = pc->pc_cpumask;
- if (id != PCPU_GET(cpumask) && (id & stopped_cpus) == 0 &&
+ if (id != me && (id & stopped_cpus) == 0 &&
td != pc->pc_idlethread) {
td->td_flags |= TDF_NEEDRESCHED;
map |= id;
OpenPOWER on IntegriCloud