lkml.org 
[lkml]   [2010]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC] perf_events: support for uncore a.k.a. nest units
    From
    Date
    On Wed, 2010-04-21 at 22:22 +0800, Peter Zijlstra wrote:
    > On Wed, 2010-04-21 at 22:12 +0000, Lin Ming wrote:
    > > + ret = pmu->commit_txn(pmu);
    > > + if (!ret) {
    > > + pmu->stop_txn(pmu);
    > > + return 0;
    > > + }
    > >
    > > group_error:
    > > + pmu->stop_txn(pmu);
    >
    > If you let commit_txn() also clear the state you can save some logic and
    > a method.

    I add this ->stop_txn(pmu) because the rollback code also need to clear
    the state.

    >
    > But yes, this looks good. If you don't remove the weak interface just
    > yet, you can do a patch per architecture that uses this (at least
    > powerpc and sparc do), and remove the weak thing at the end once all
    > users are gone.
    >

    OK, I'll do that for powerpc and sparc.

    And need to check if there are transaction methods in group_sched_in for
    other arch, as below.

    group_sched_in(...)
    {
    if (pmu->start_txn)
    pmu->start_txn(pmu);

    if (pmu->commit_txn)
    pmu->commit_txn(pmu)
    }

    Thanks,
    Lin Ming



    \
     
     \ /
      Last update: 2010-04-21 16:41    [W:6.505 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site