Subject: Re: sparc64 pmap optimizations
To: David Laight <david@l8s.co.uk>
From: Chuck Silvers <chuq@chuq.com>
List: port-sparc64
Date: 08/26/2002 22:35:44
On Mon, Aug 26, 2002 at 11:46:15AM +0100, David Laight wrote:
> > 
> > fork+exit
> > orig	0.025u 0.979s 0:09.22 10.7%     0+0k 0+1io 0pf+0w
> > chuq	0.014u 0.674s 0:07.51 9.0%      0+0k 0+0io 0pf+0w
> > improvement	18.5%
> > 
> > for+exec+exit
> > orig	0.076u 2.232s 0:07.57 30.3%     0+0k 0+3io 0pf+0w
> > chuq	0.137u 1.609s 0:05.92 29.2%     0+0k 0+1io 0pf+0w
> > improvement	21.8%
> 
> What are you using to get those timings?

that's tcsh's "time" built-in.  I was only looking at the wall-clock time.


> The kernel counting of process time contains (at least) 2 bugs:
> 
> 1) processes that are never interrupted by a clock tick are
>    not give any cpu time.
>    calcru returns 0 if (tot == 0), rather than (say) setting
>    tot = u = 1 so that all the time is given to the user.
> 
> 2) the time from the last process switch/clock tick until the
>    process exits is ignored.
>    exit1 sets p->p_stat = SDEAD before calling caclru - which
>    check p->p_stat == SONPROC to collect tim for the current
>    process.
>    Move the code that sets the process state (in exit1) to
>    below the calcru bit.


could you open a PR with this info?

-Chuck