Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2002 16:41:17 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Peter Jeremy <peter.jeremy@alcatel.com.au>
Cc:        Terry Lambert <tlambert2@mindspring.com>, Peter Wemm <peter@wemm.org>, Alfred Perlstein <bright@mu.org>, Kelly Yancey <kbyanc@posi.net>, Nate Williams <nate@yogotech.com>, Daniel Eischen <eischen@pcnet1.pcnet.com>, Dan Eischen <eischen@vigrid.com>, Archie Cobbs <archie@dellroad.org>, <arch@FreeBSD.ORG>
Subject:   Re: Request for review: getcontext, setcontext, etc
Message-ID:  <20020114162150.S4436-100000@gamplex.bde.org>
In-Reply-To: <20020114153148.W561@gsmx07.alcatel.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 14 Jan 2002, Peter Jeremy wrote:

> On 2002-Jan-14 13:31:20 +1100, Bruce Evans <bde@zeta.org.au> wrote:
> >>...
> >>   ctxt     DNA    FP
> >>  swtch    traps  swtch
> >> 1754982  281557  59753  build world and a few CVS operations [1]
> >>   79044   18811  10341  gnuplot and xv in parallel [2]
> >>     800     138    130  parallel FP-intensive progs [3].
> >>...
> >...
> >220000 extra FP context switches at 264 cycles each would increase my
> >buildworld time by a whole 0.34 seconds or 0.025%.  There may be more
> >important things to optimize :-).
>
> Except that removing the lazy FPU switching would translate 280,000
> DNA traps into 1,755,000 f*rstor's.  Though you could probably cut
> this number down by changing the FPU switching code to always do an
> f*rstor if the process ever uses FP.  (As someone else suggested).

Increases in CPU speeds have cut the numbers down to not many more than
280000.  The following times are for buildworld with many local
optimizations and no kernels or modules:

Celeron366 @ 5.5 * 95 MHz
--------------------------------------------------------------
>>> elf make world completed on Mon Nov 19 15:10:42 EST 2001
                       (started Mon Nov 19 14:00:22 EST 2001)
--------------------------------------------------------------
     4219.83 real      3253.04 user       667.64 sys
...
    365764  voluntary context switches
   1074456  involuntary context switches

Athlon1600 & 10.5 * 146 MHz
--------------------------------------------------------------
>>> elf make world completed on Fri Jan  4 00:00:15 EST 2002
                    (started on Thu Jan  3 23:37:04 EST 2002)
--------------------------------------------------------------
     1390.18 real       913.56 user       232.63 sys
...
    346041  voluntary context switches
    423794  involuntary context switches

This is under my version -current where there are a lot more context
switches for interrupt tasks, especially in my version where there are
switches for clock interrupts.  128+100 context switches for clock
interrupts is actually quite a lot from one viewpoint.  4219 seconds
worth of these accounts for 916332 of the 1074456 involuntary context
switches on the old machine.  However, it is almost zero from a
practical viewpoint.

Bruce


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




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