From owner-cvs-sys Fri Apr 19 01:07:32 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id BAA07551 for cvs-sys-outgoing; Fri, 19 Apr 1996 01:07:32 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id BAA07544 Fri, 19 Apr 1996 01:07:25 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id SAA08335; Fri, 19 Apr 1996 18:05:41 +1000 Date: Fri, 19 Apr 1996 18:05:41 +1000 From: Bruce Evans Message-Id: <199604190805.SAA08335@godzilla.zeta.org.au> To: davidg@Root.COM, phk@critter.tfs.com Subject: Re: cvs commit: src/sys/i386/i386 swtch.s vm_machdep.c src/sys/i386/include pcb.h src/sys/i386/isa wd.c Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, phk@freefall.freebsd.org Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >We save about 6 clock cycles in cpu_switch but not caring about %eax :-) It should save only 1 cycle on a 486 and 0.5 or 1 cycles on a Pentium :-). Even if the value has to be loaded from memory, it should be in a cache line next to one of the other values loaded from memory unless the pcb has unfortunate alignment. In any case, perhaps we could change the alignment to save more cycles. Many more cycles could be saved for the npx switch. First, some of the pushls and popls are no longer necessary. Second, fnsave could be used directly except on systems using IRQ13. Third, the npx switch could be lazier, so that it never occurs if only one process uses the cpu (this requires calling savectx() from more places, in particular before swapping out the upages). This might be useful for doing better on biased benchmarks. (If the npx is actively used by several processes concurrently then lazy switching is a pessimization.) Bruce