From owner-freebsd-current@FreeBSD.ORG Sat Apr 5 02:52:35 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7254F37B401; Sat, 5 Apr 2003 02:52:35 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B22E43FBF; Sat, 5 Apr 2003 02:52:34 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA11865; Sat, 5 Apr 2003 20:52:32 +1000 Date: Sat, 5 Apr 2003 20:52:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: current@freebsd.org In-Reply-To: <20030405194620.I645@gamplex.bde.org> Message-ID: <20030405204940.L800@gamplex.bde.org> References: <20030405194620.I645@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: peter@freebsd.org Subject: Re: context switching pessimizations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2003 10:52:35 -0000 On Sat, 5 Apr 2003, Bruce Evans wrote: > Recent optimizations of context switching are large pessimizations > according to lmbench2, at least in the default case (no LAZY_SWITCH). The ifdefs are just so convoluted that they are broken in the !LAZY_SWITCH case. %%% Index: swtch.s =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/swtch.s,v retrieving revision 1.136 diff -u -2 -r1.136 swtch.s --- swtch.s 2 Apr 2003 23:53:28 -0000 1.136 +++ swtch.s 5 Apr 2003 10:40:20 -0000 @@ -175,4 +175,5 @@ #endif 1: +#endif movl %cr3,%ebx /* The same address space? */ cmpl %ebx,%eax @@ -182,6 +183,4 @@ je sw1 #endif -#endif - #ifdef SWTCH_OPTIM_STATS incl tlb_flush_count %%% Bruce