From owner-freebsd-current Wed Dec 18 9:23:43 2002 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 0874B37B401 for ; Wed, 18 Dec 2002 09:23:41 -0800 (PST) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A86F43EB2 for ; Wed, 18 Dec 2002 09:23:40 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 15044 invoked from network); 18 Dec 2002 17:23:43 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 18 Dec 2002 17:23:43 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id gBIHNcUT015708; Wed, 18 Dec 2002 12:23:38 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <3DFFE7FB.2317DFCF@mindspring.com> Date: Wed, 18 Dec 2002 12:23:38 -0500 (EST) From: John Baldwin To: Terry Lambert Subject: Re: 80386 out of GENERIC Cc: Alex , phk@FreeBSD.ORG, Johnson David , current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 18-Dec-2002 Terry Lambert wrote: > John Baldwin wrote: >> This has nothing to do with /dev/random. Please stop with the constant >> FUDing Terry. > >| Revision 1.296 / (download) - annotate - [select for diffs], Sun Jan 14 >| 10:11:10 2001 UTC (23 months ago) by jhb >| Branch: MAIN >| Changes since 1.295: +2 -2 lines >| Diff to previous 1.295 (colored) >| >| Remove I386_CPU from GENERIC. Support for the 386 seriously pessimizes >| performance on other x86 processors. Custom kernels can still be built >| that will run on the 386. > > The pessimization that was being discussed right before that happened > was "harvesting entropy for /dev/random". I can provide mailing list > quotes about that bracketing those dates. No, the pessimization is: #if defined(I386_CPU) || defined(CPU_DISABLE_CMPXCHG) static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) { int res = exp; __asm __volatile( " pushfl ; " " cli ; " " cmpl %0,%2 ; " " jne 1f ; " " movl %1,%2 ; " "1: " " sete %%al; " " movzbl %%al,%0 ; " " popfl ; " "# atomic_cmpset_int" : "+a" (res) /* 0 (result) */ : "r" (src), /* 1 */ "m" (*(dst)) /* 2 */ : "memory"); return (res); } #else /* defined(I386_CPU) */ static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) { int res = exp; __asm __volatile ( " " __XSTRING(MPLOCKED) " " " cmpxchgl %1,%2 ; " " setz %%al ; " " movzbl %%al,%0 ; " "1: " "# atomic_cmpset_int" : "+a" (res) /* 0 (result) */ : "r" (src), /* 1 */ "m" (*(dst)) /* 2 */ : "memory"); return (res); } #endif /* defined(I386_CPU) */ > Was there a particular pessimization other than /dev/random that you > were thinking of when you made the commit comment? Yes, the one above. It came in as part of SMPng. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message