From owner-svn-src-user@FreeBSD.ORG Tue May 26 18:45:40 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B2D91065716 for ; Tue, 26 May 2009 18:45:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f168.google.com (mail-fx0-f168.google.com [209.85.220.168]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC378FC1D for ; Tue, 26 May 2009 18:45:40 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by fxm12 with SMTP id 12so4162500fxm.43 for ; Tue, 26 May 2009 11:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=bYyOj/cGnN7arB8bEWFQLFqY/d9Rj4XL9JsPR38opOk=; b=tskItpHDPtEK9CwdroyvSNPsOwv72dSgA57UDzdCjoqVRiAm/HcZirHIVcxTAyM8lW tw5jyIw/GDHgT28pCVnY18ww8s0ZNLaVapE1TdATnmv2XhqNb05dNCNAUW3FLRdrf+Tc /gRXSxGlCIGGQdJWarHI770cgJIDTXYBCh2KI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=T+mM3Ozrg/p7hPZTmuWtouYGcniLvAHibgRt9GSJpb2ro4uKhAQZUaK4t7mr02U1xq UvS4IVnyJm6SS4aBgIOJYJLaoYFwdzHxzoEzSRUsvLgOaSI4UplcirXEH6Rhzi6eHTvC 2w7mp9IXhtJO6Q7A4XWzTaaW4duDJm0PEhJR0= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.103.207 with SMTP id l15mr4686327fao.2.1243362242952; Tue, 26 May 2009 11:24:02 -0700 (PDT) In-Reply-To: <200905222145.n4MLjhm3019802@svn.freebsd.org> References: <200905222145.n4MLjhm3019802@svn.freebsd.org> Date: Tue, 26 May 2009 20:24:02 +0200 X-Google-Sender-Auth: 39966acf4aa273e5 Message-ID: <3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d@mail.gmail.com> From: Attilio Rao To: Kip Macy Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r192604 - in user/kmacy/releng_7_2_fcs/sys: dev/hwpmc sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2009 18:45:41 -0000 2009/5/22 Kip Macy : > Author: kmacy > Date: Fri May 22 21:45:43 2009 > New Revision: 192604 > URL: http://svn.freebsd.org/changeset/base/192604 > > Log: > - remove pmc_kthread_mtx > - replace sleep/wakeup on kthread with a condvar > @@ -341,14 +335,12 @@ pmclog_loop(void *arg) > > mtx_lock_spin(&pmc_bufferlist_mtx); > TAILQ_INSERT_HEAD(&pmc_bufferlist, lb, plb_next); > - mtx_unlock_spin(&pmc_bufferlist_mtx); > > lb = NULL; > } Is this mtx_unlock_spin() removal intended to happen? If not, it does introduce a LO between pmc_bufferlist_mtx and po_mtx. > @@ -591,10 +582,10 @@ pmclog_configure_log(struct pmc_mdep *md > > error: > /* shutdown the thread */ > - mtx_lock(&pmc_kthread_mtx); > + mtx_lock_spin(&po->po_mtx); > if (po->po_kthread) > pmclog_stop_kthread(po); > - mtx_unlock(&pmc_kthread_mtx); > + mtx_lock_spin(&po->po_mtx); Shouldn't this be mtx_unlock_spin() ? The other part looks good. Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein