Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2002 12:44:46 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Christian Weisgerber <naddy@mips.inka.de>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: top shows weird CPU figures
Message-ID:  <20020721122804.U18590-100000@gamplex.bde.org>
In-Reply-To: <ahbsbh$2pu0$1@kemoauc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <run a long time> <sleep> <run a short time> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020721122804.U18590-100000>