kern/65857: sched_ule.c doesn't honor P_NOLOAD, leading to high (by
one) vm.loadavg
Nikos Ntarmos
ntarmos at ceid.upatras.gr
Wed Apr 21 11:00:39 PDT 2004
>Number: 65857
>Category: kern
>Synopsis: sched_ule.c doesn't honor P_NOLOAD, leading to high (by one) vm.loadavg
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Apr 21 11:00:38 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Nikos Ntarmos
>Release: FreeBSD 5.2-CURRENT alpha
>Organization:
NetCINS Lab - CEID - UPatras - Greece
>Environment:
System: FreeBSD Gatekeeper.ceid.upatras.gr 5.2-CURRENT FreeBSD 5.2-CURRENT #11: Wed Apr 21 03:22:39 EEST 2004 root at Gatekeeper.ceid.upatras.gr:/usr/obj/usr/src/sys/GATEKEEPER alpha
>Description:
sched_ule.c doesn't honor P_NOLOAD. This results in the system
load being reported as "expected-load-plus-one", also refernced
in a current@ thread back in January 2004. This is ULE-specific.
>How-To-Repeat:
Just run CURRENT with 'options SCHED_ULE' and see the system load
(as reported by vm.loadavg or userland tools such as top) hovering
to 1.00 for an idle system, or to "expected-load-plus-one" in general.
>Fix:
--- sys/kern/sched_ule.c.orig Wed Apr 21 03:10:29 2004
+++ sys/kern/sched_ule.c Wed Apr 21 03:20:34 2004
@@ -357,7 +357,7 @@
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 @@
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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list