Date: Tue, 26 May 2009 20:24:02 +0200 From: Attilio Rao <attilio@freebsd.org> To: Kip Macy <kmacy@freebsd.org> 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 Message-ID: <3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d@mail.gmail.com> In-Reply-To: <200905222145.n4MLjhm3019802@svn.freebsd.org> References: <200905222145.n4MLjhm3019802@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2009/5/22 Kip Macy <kmacy@freebsd.org>: > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d>