summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-04-22 21:37:46 +0000
committerobrien <obrien@FreeBSD.org>2004-04-22 21:37:46 +0000
commitcbc25a780d4495552e787db7a73df5de107da241 (patch)
tree29e48d09f3985d9afe6fc0df40337e0e7230d20e /sys/kern
parenta0d6a22b415d781561c98c0a04fae9ad59350fe9 (diff)
downloadFreeBSD-src-cbc25a780d4495552e787db7a73df5de107da241.zip
FreeBSD-src-cbc25a780d4495552e787db7a73df5de107da241.tar.gz
There was a thread on "unusually high load averages" when running under
sched_ule, in January 2004. Looking at this, "pagezero" is (one of) the culprit(s). We had no provision for processes with P_NOLOAD set. With pagezero not running at PRI_ITHD, kseq_load_{add,rem} count pagezero as another-normal-process, thus the "expected-plus-one" load reported in the above thread. Submitted by: Nikos Ntarmos <ntarmos@ceid.upatras.gr>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sched_ule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c
index a2268d3..a65fdf1 100644
--- a/sys/kern/sched_ule.c
+++ b/sys/kern/sched_ule.c
@@ -357,7 +357,7 @@ kseq_load_add(struct kseq *kseq, struct kse *ke)
if (class == PRI_TIMESHARE)
kseq->ksq_load_timeshare++;
kseq->ksq_load++;
- if (class != PRI_ITHD)
+ if (class != PRI_ITHD && (ke->ke_proc->p_flag & P_NOLOAD) == 0)
#ifdef SMP
kseq->ksq_group->ksg_load++;
#else
@@ -380,7 +380,7 @@ kseq_load_rem(struct kseq *kseq, struct kse *ke)
class = PRI_BASE(ke->ke_ksegrp->kg_pri_class);
if (class == PRI_TIMESHARE)
kseq->ksq_load_timeshare--;
- if (class != PRI_ITHD)
+ if (class != PRI_ITHD && (ke->ke_proc->p_flag & P_NOLOAD) == 0)
#ifdef SMP
kseq->ksq_group->ksg_load--;
#else
OpenPOWER on IntegriCloud