Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2009 11:26:31 -0700
From:      Kip Macy <kmacy@freebsd.org>
To:        Attilio Rao <attilio@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:  <3c1674c90905261126g665af4e4j7f89ac92899bb08b@mail.gmail.com>
In-Reply-To: <3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d@mail.gmail.com>
References:  <200905222145.n4MLjhm3019802@svn.freebsd.org> <3bbf2fe10905261124s3fccfe7brb881ece5f8fe339d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 26, 2009 at 11:24 AM, Attilio Rao <attilio@freebsd.org> wrote:
> 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:
>> =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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3c1674c90905261126g665af4e4j7f89ac92899bb08b>