From owner-cvs-all@FreeBSD.ORG Wed Dec 27 22:52:15 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E119016A403; Wed, 27 Dec 2006 22:52:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 8A11E13C463; Wed, 27 Dec 2006 22:52:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kBRMOKbf059124; Wed, 27 Dec 2006 17:24:20 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Bruce Evans Date: Wed, 27 Dec 2006 16:50:05 -0500 User-Agent: KMail/1.9.4 References: <200612272026.kBRKQ1gP000873@repoman.freebsd.org> In-Reply-To: <200612272026.kBRKQ1gP000873@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612271650.06432.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Wed, 27 Dec 2006 17:24:20 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2386/Wed Dec 27 13:32:31 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/amd64/include atomic.h src/sys/i386/include atomic.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2006 22:52:16 -0000 On Wednesday 27 December 2006 15:26, Bruce Evans wrote: > bde 2006-12-27 20:26:00 UTC > > FreeBSD src repository > > Modified files: > sys/amd64/include atomic.h > sys/i386/include atomic.h > Log: > Avoid an instruction in atomic_cmpset_{int_long)() in most cases. > These functions are used a lot for mutexes, so this reduces the text > size of an average kernel by about 0.75%. This wasn't intended to > be a significant optimization, but it somehow increased the maximum > number of packets per second that can be transmitted by my bge hardware > from 320000 to 460000 (this benchmark is CPU-bound and remarkably > sensitive to changes in the text section). Very cool, thanks! It'd be nice to get rid of the 'sete' as well (if there were someway to let gcc know that a bool return value was mapped to a flag in %eflags), but this fix alone is most welcome. -- John Baldwin