Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Mar 2008 01:25:16 -0700
From:      "Peter Wemm" <peter@wemm.org>
To:        "David Xu" <davidxu@freebsd.org>
Cc:        arch@freebsd.org
Subject:   Re: amd64 cpu_switch in C.
Message-ID:  <e7db6d980803120125y41926333hb2724ecd07c0ac92@mail.gmail.com>
In-Reply-To: <47D758AC.2020605@freebsd.org>
References:  <20080310161115.X1091@desktop> <47D758AC.2020605@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 11, 2008 at 9:14 PM, David Xu <davidxu@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e7db6d980803120125y41926333hb2724ecd07c0ac92>