From owner-freebsd-arch Sun Jan 13 21:40:51 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id B78C937B402 for ; Sun, 13 Jan 2002 21:40:46 -0800 (PST) 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 QAA26377; Mon, 14 Jan 2002 16:40:14 +1100 Date: Mon, 14 Jan 2002 16:41:17 +1100 (EST) From: Bruce Evans X-X-Sender: To: Peter Jeremy Cc: Terry Lambert , Peter Wemm , Alfred Perlstein , Kelly Yancey , Nate Williams , Daniel Eischen , Dan Eischen , Archie Cobbs , Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <20020114153148.W561@gsmx07.alcatel.com.au> Message-ID: <20020114162150.S4436-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 14 Jan 2002, Peter Jeremy wrote: > On 2002-Jan-14 13:31:20 +1100, Bruce Evans 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