From owner-cvs-src@FreeBSD.ORG Wed Feb 9 18:52:28 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4B7B16A4CE for ; Wed, 9 Feb 2005 18:52:28 +0000 (GMT) Received: from mail21.sea5.speakeasy.net (mail21.sea5.speakeasy.net [69.17.117.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3711A43D39 for ; Wed, 9 Feb 2005 18:52:28 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 17286 invoked from network); 9 Feb 2005 18:52:27 -0000 Received: from server.baldwin.cx ([216.27.160.63]) (envelope-sender )AES256-SHA encrypted SMTP for ; 9 Feb 2005 18:52:27 -0000 Received: from [10.50.40.202] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id j19Iq6Xf004441; Wed, 9 Feb 2005 13:52:22 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: obrien@FreeBSD.org Date: Wed, 9 Feb 2005 13:53:10 -0500 User-Agent: KMail/1.6.2 References: <200502082025.j18KP72E069507@repoman.freebsd.org> <20050209041221.GA16675@dragon.nuxi.com> In-Reply-To: <20050209041221.GA16675@dragon.nuxi.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200502091353.10200.jhb@FreeBSD.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-102.8 required=4.2 tests=ALL_TRUSTED, USER_IN_WHITELIST autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 apic_vector.s local_apic.c mp_machdep.c src/sys/i386/include apicvar.h smp.h src/sys/i386/isa clock.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2005 18:52:29 -0000 On Tuesday 08 February 2005 11:12 pm, David O'Brien wrote: > On Tue, Feb 08, 2005 at 08:25:07PM +0000, John Baldwin wrote: > > jhb 2005-02-08 20:25:07 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/i386/i386 apic_vector.s local_apic.c mp_machdep.c > > sys/i386/include apicvar.h smp.h > > sys/i386/isa clock.c > > Log: > > Use the local APIC timer to drive the various kernel clocks on SMP > > machines rather than forwarding interrupts from the clock devices around > > using IPIs: - Add an IDT vector that pushes a clock frame and calls > > lapic_handle_timer(). > > What is the performance improvement of this? What benchmark is used to > show a benefit? Getting rid of these two IPIs means that no IPI handlers now need to access spinlocks and we will now be able to look at allowing IPIs to fire while spinlocks are held thus reducing latency for TLB shootdowns, etc. Also, making the clock stuff a little less synchronized (more like Alpha FWIW) should reduce contention on sched_lock since {hard,stat,prof}clock() all bang on sched_lock (i.e. all the CPUs don't always run fooclock() at the same exact time now). Also, by removing the need for functioning clocks when using the APIC, we don't really have to care as much if the RTC and ISA timer interrupts really work anymore when using an APIC (though I keep the "real" clocks on UP systems for now). I did not do any formal benchmarks, however and I don't think anyone else who tested this did either. Of course, I also posted these patches several weeks ago and hardly anyone bothered to test them then (same for the spinlock_* patches as well). I can go work on some buildworld loop benchmarks though as I haven't integ'd this into my work trees yet so I still have a base to compare against. Speaking of benchmarks, how about testing the patches I posted to amd64@? Specifically, how about benchmarking the atomic patch to change membars to use the fence instructions? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org