From owner-cvs-all@FreeBSD.ORG Tue Oct 16 18:11:25 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CBC016A418; Tue, 16 Oct 2007 18:11:25 +0000 (UTC) (envelope-from jasone@freebsd.org) Received: from canonware.com (canonware.com [64.183.146.166]) by mx1.freebsd.org (Postfix) with ESMTP id 3DDCF13C474; Tue, 16 Oct 2007 18:11:24 +0000 (UTC) (envelope-from jasone@freebsd.org) Received: from [192.168.168.201] (canonware.com [64.183.146.166]) by canonware.com (Postfix) with ESMTP id 928B412989E; Tue, 16 Oct 2007 10:50:04 -0700 (PDT) Message-ID: <4714F750.9010804@freebsd.org> Date: Tue, 16 Oct 2007 10:39:28 -0700 From: Jason Evans User-Agent: Thunderbird 1.5.0.12 (X11/20070718) MIME-Version: 1.0 To: Kris Kennaway References: <200710160736.l9G7a3oI087966@repoman.freebsd.org> <471480AB.7090500@FreeBSD.org> In-Reply-To: <471480AB.7090500@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, David Xu , cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libthr/thread thr_pspinlock.c 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: Tue, 16 Oct 2007 18:11:25 -0000 Kris Kennaway wrote: > David Xu wrote: >> FreeBSD src repository >> >> Modified files: >> lib/libthr/thread thr_pspinlock.c Log: >> Reverse the logic of UP and SMP. >> Submitted by: jasone >> Revision Changes Path >> 1.6 +1 -1 src/lib/libthr/thread/thr_pspinlock.c > > Are there any common applications that use this? It's worth mentioning that this change, although correct, does not make a measurable performance difference for the tests I was running when I found the bug. It is possible that making the spinlocks adaptive would help, but I didn't look into this. (I was working on malloc performance enhancements that have turned out very nicely, but in the end I had to switch to hand-rolled "spin" mutexes that eventually convert to blocking, in order to avoid the possibility of unrecoverable priority inversion.) Jason