From 207a6c0dcb8b74cace4a2da2ec18b79b2e448b86 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Thu, 22 Apr 2004 21:37:46 +0000 Subject: [PATCH] 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 --- sys/kern/sched_ule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index a2268d3eec8..a65fdf1e5f6 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