From owner-freebsd-current Sat Jul 20 19:40:55 2002 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 679A937B400 for ; Sat, 20 Jul 2002 19:40:53 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EBAE43E64 for ; Sat, 20 Jul 2002 19:40:52 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id MAA00419; Sun, 21 Jul 2002 12:40:45 +1000 Date: Sun, 21 Jul 2002 12:44:46 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Christian Weisgerber Cc: freebsd-current@FreeBSD.ORG Subject: Re: top shows weird CPU figures In-Reply-To: Message-ID: <20020721122804.U18590-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 20 Jul 2002, Christian Weisgerber wrote: > top(1) shows weird WCPU/CPU figures for my setiathome process. A > few minutes ago, it gave four-digit(!) percent figures, i.e. 4000% > and such, now it shows a solid 0.00% despite setiathome being the > one process to produce the overall "75% nice" figure. > > This is on -CURRENT/alpha from July 17. > (setiathome is a Tru64 executable running under emulation.) This is probably fixed in kern_synch.c.1.188 on July 17. %CPU (not to mention scheduling) was completely broken by considering sleeping processes to be running and scheduling them, and running processes to be sleeping and not scheduling them. All running processes had %CPU == 0 except just after they became runnable. I think the huge %CPUs are from sequences. CPU ticks are accumulated during the long run period but not handled properly. Then they are handled sort of backwards during the sleep period. Then they all appear at once during the next run period, and 400% results when there are 4 times as many ticks as possible in the short run period. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message