From owner-freebsd-arch@FreeBSD.ORG Wed Mar 12 08:25:18 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B0AA1065672 for ; Wed, 12 Mar 2008 08:25:18 +0000 (UTC) (envelope-from peter@wemm.org) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id B91498FC22 for ; Wed, 12 Mar 2008 08:25:17 +0000 (UTC) (envelope-from peter@wemm.org) Received: by an-out-0708.google.com with SMTP id c14so852913anc.13 for ; Wed, 12 Mar 2008 01:25:17 -0700 (PDT) Received: by 10.100.94.14 with SMTP id r14mr15661286anb.23.1205310316735; Wed, 12 Mar 2008 01:25:16 -0700 (PDT) Received: by 10.100.8.6 with HTTP; Wed, 12 Mar 2008 01:25:16 -0700 (PDT) Message-ID: Date: Wed, 12 Mar 2008 01:25:16 -0700 From: "Peter Wemm" To: "David Xu" In-Reply-To: <47D758AC.2020605@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080310161115.X1091@desktop> <47D758AC.2020605@freebsd.org> Cc: arch@freebsd.org Subject: Re: amd64 cpu_switch in C. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Mar 2008 08:25:18 -0000 On Tue, Mar 11, 2008 at 9:14 PM, David Xu wrote: > Jeff Roberson wrote: > > http://people.freebsd.org/~jeff/amd64.diff > > This is a good idea. In fact, according to calling conversion, some > registers are not needed to be saved across function call, e.g on > i386, eax, edx, and ecx. :-) but gdb may need them to dig out > stack variable's value. Jeff and I have been having a friendly "competition" today. With a UP kernel and INVARIANTS, my initial counter-patch response had nearly double the gain on my machine. (Jeff 7%, mine: 13.5%). I changed to compile kernels the same as he did (no invariants, SMP kernel, but kern.smp.disabled=1). After that, our patch sets were the same again - both at about 10% gain over baseline. I've made a few more changes and am now at 23% improvement over baseline. I'm not confident of testing methodology. More tests are in progress. The good news is that this tuning is finally being done. It should have been done in 2003 though... -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell