From owner-freebsd-current@FreeBSD.ORG Tue Apr 20 17:32:18 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5880116A4CF for ; Tue, 20 Apr 2004 17:32:18 -0700 (PDT) Received: from diogenis.ceid.upatras.gr (diogenis.ceid.upatras.gr [150.140.141.181]) by mx1.FreeBSD.org (Postfix) with SMTP id D310143D5E for ; Tue, 20 Apr 2004 17:32:16 -0700 (PDT) (envelope-from ntarmos@Noth.ceid.upatras.gr) Received: (qmail 8103 invoked from network); 21 Apr 2004 00:32:14 -0000 Received: from noth.ceid.upatras.gr (150.140.143.234) by diogenis.ceid.upatras.gr with SMTP; 21 Apr 2004 00:32:14 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by Noth.ceid.upatras.gr (Postfix) with ESMTP id ED976FC34 for ; Wed, 21 Apr 2004 03:32:30 +0300 (EEST) Received: from Noth.ceid.upatras.gr ([127.0.0.1]) by localhost (Noth [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12022-07 for ; Wed, 21 Apr 2004 03:32:30 +0300 (EEST) Received: by Noth.ceid.upatras.gr (Postfix, from userid 1000) id 53663FBBA; Wed, 21 Apr 2004 03:32:30 +0300 (EEST) Date: Wed, 21 Apr 2004 03:32:30 +0300 From: Nikos Ntarmos To: current@FreeBSD.org Message-ID: <20040421003230.GA17810@diogenis.ceid.upatras.gr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline User-Agent: Mutt/1.5.5.1+cvs20040105i X-Virus-Scanned: by amavisd-new-20030616-p7 (Debian) at Noth.ceid.upatras.gr Subject: P_NOLOAD + ULE = high load averages X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 00:32:18 -0000 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi all. There was a thread on "unusually high load averages" when running under sched_ule, which (afaik) came at an abrupt halt in January 2004. Anyway, I've been looking at this thing lately and have come to believe that "pagezero" is (one of) the culprit(s). IMO the source of the problem lies in /sys/kern/sched_ule.c having no provision for processes with P_NOLOAD set. With pagezero not running at PRI_ITHD, kseq_load_{add,rem} count pagezero as oh-another-normal-process, thus the "expected-plus-one" load reported in the above thread. The attached diff should fix this (at least it has fixed it here -- running 5.2-CURRENT on a PCA56, just cvsup'ed from cvsup.gr.freebsd.org). Could someone please review/commit the changes or should I better send-pr it? \n\n -- Nikos "Noth" Ntarmos | < ntarmos at ceid dot upatras dot gr > NetCINS Lab. @ C.E.I.D. | [ http://{noth,p2p}.ceid.upatras.gr/ ] U. of Patras - Greece | ( 38.2594N, 21.7428E ) ( 1024D / CF95160A ) --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sched_ule+P_NOLOAD.patch" --- 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 --IJpNTDwzlM2Ie8A6--