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>

index | next in thread | previous in thread | raw e-mail

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:
>>  - 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() ?
>


Oh wow :(
Thanks,
Kip


help

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