Date: Wed, 21 Apr 2004 20:50:58 +0300 (EEST) From: Nikos Ntarmos <ntarmos@ceid.upatras.gr> To: FreeBSD-gnats-submit@FreeBSD.org Cc: ntarmos@ceid.upatras.gr Subject: kern/65857: sched_ule.c doesn't honor P_NOLOAD, leading to high (by one) vm.loadavg Message-ID: <20040421175058.DE3DB5E9@Gatekeeper.ceid.upatras.gr> Resent-Message-ID: <200404211800.i3LI0d0E082842@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040421175058.DE3DB5E9>
