Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 1999 07:48:33 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        amagai@nue.org, tobez@plab.ku.dk
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: kern/10402: times(3) non-decreaseness broken in 4.0
Message-ID:  <199903102048.HAA24787@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> Subject: Re: kern/10402: times(3) non-decreaseness broken in 4.0
>> Date: Wed, 10 Mar 1999 17:23:11 +0900 (JST)
>> 
>>  Dear, I have a same problem.  CPU consumption time is decreased occasionally.
>>  Environment: FreeBSD 2.2.8-RELEASE, FreeBSD 3.1-RELEASE

>Why it happens I don't know.  The only seems-to-be-relevant piece of
>code that changed in comparison to 3.1 is the global removal of
>p_switchtime.  calcru() in /usr/src/sys/kern/kern_resource.c uses now
>switchtime instead.
>
>Probably this:
>
>	/usr/src/sys/sys/proc.h
>	1.72 Sun Feb 28 10:53:29 1999 UTC by bde
>
>is somehow related to the problem.

Oops.  The switchtime changes broke accounting for the current timeslice
whenever calcru() is called.  Your example loops calling getrusage()
which calls calcru(), so its user+sys time is accounted as almost 0.
This made "non-decreaseness" more obvious as a side effect.  I will
commit fixes for both problems tomorrow.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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