From owner-svn-src-user@FreeBSD.ORG Tue May 26 18:26:33 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 4224F106564A; Tue, 26 May 2009 18:26:33 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 726B08FC19; Tue, 26 May 2009 18:26:32 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by ey-out-2122.google.com with SMTP id 9so841708eyd.7 for ; Tue, 26 May 2009 11:26:31 -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=HDg1/o5VSDqIyqiF6qBAGq+wBk3Rf5x0R8W1HfYgVlA=; b=mHO1yqt1dG21/VAWtfTNvHXuRqErNvgrzDbD34KW3lnGOZ4njqQlYp6eAX/YNPF6ng lSYhQzk9mMJmpwF/gcZIolPhkwGCUtP/wr1K6ahta6/P6UnazFeeZTBL1pOQDUX9See8 Zf475k2D56FP9Sr5rFAK8vVsTaL+mw2YIIZFA= 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=mceLpMBRSrIQgAi1RP7ngCmaTppASP1FmVcYki6eJdw7bSlNc1QGYgfYGUp1PdEu03 LfJ9OmgW8U7XsdrbToLToo5Iplr0vy7L1OIPgYIA1gX4rdBZlx8VpOT+jJrNFlQlp0jk eCSZ9SMTG6DdsEvp7l6A47B5vVY+lWbKA5Cho= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.216.54.194 with SMTP id i44mr3276332wec.93.1243362391139; Tue, 26 May 2009 11:26:31 -0700 (PDT) In-Reply-To: <3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d@mail.gmail.com> References: <200905222145.n4MLjhm3019802@svn.freebsd.org> <3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d@mail.gmail.com> Date: Tue, 26 May 2009 11:26:31 -0700 X-Google-Sender-Auth: 5b1a2a0a4d35f4e0 Message-ID: <3c1674c90905261126g665af4e4j7f89ac92899bb08b@mail.gmail.com> From: Kip Macy To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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:26:33 -0000 On Tue, May 26, 2009 at 11:24 AM, Attilio Rao wrote: > 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: >> =A0- remove pmc_kthread_mtx >> =A0- replace sleep/wakeup on kthread with a condvar > >> @@ -341,14 +335,12 @@ pmclog_loop(void *arg) >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mtx_lock_spin(&pmc_bufferlist_mtx); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0TAILQ_INSERT_HEAD(&pmc_bufferlist, lb, pl= b_next); >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 mtx_unlock_spin(&pmc_bufferlist_mtx); >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0lb =3D NULL; >> =A0 =A0 =A0 =A0} > > 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 >> >> =A0error: >> =A0 =A0 =A0 =A0/* shutdown the thread */ >> - =A0 =A0 =A0 mtx_lock(&pmc_kthread_mtx); >> + =A0 =A0 =A0 mtx_lock_spin(&po->po_mtx); >> =A0 =A0 =A0 =A0if (po->po_kthread) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pmclog_stop_kthread(po); >> - =A0 =A0 =A0 mtx_unlock(&pmc_kthread_mtx); >> + =A0 =A0 =A0 mtx_lock_spin(&po->po_mtx); > > Shouldn't this be mtx_unlock_spin() ? > Oh wow :( Thanks, Kip