[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274801531.5882.1670.camel@twins>
Date: Tue, 25 May 2010 17:32:11 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: eranian@...il.com, linux-kernel@...r.kernel.org, mingo@...e.hu,
paulus@...ba.org, davem@...emloft.net, fweisbec@...il.com,
acme@...radead.org, ming.m.lin@...el.com,
perfmon2-devel@...ts.sf.net
Subject: Re: [PATCH] perf_events: fix event scheduling issues introduced by
transactional API (take 2)
On Tue, 2010-05-25 at 17:02 +0200, Stephane Eranian wrote:
> Ok, the patch look good expect it needs:
>
> static int x86_pmu_commit_txn(const struct pmu *pmu)
> {
> ......
> /*
> * copy new assignment, now we know it is possible
> * will be used by hw_perf_enable()
> */
> memcpy(cpuc->assign, assign, n*sizeof(int));
>
> cpuc->n_txn = 0;
>
> return 0;
> }
>
> Because you always call cancel_txn() even when commit()
> succeeds. I don't really understand why. I think it could be
> avoided by clearing the group_flag in commit_txn() if it
> succeeds. It would also make the logical flow more natural. Why
> cancel something that has succeeded. You cancel when you fail/abort.
Gah, I forgot about that. I think I suggested to Lin to do that and then
promptly forgot.
Let me add that and at least push this patch fwd, we can try and clean
up that detail later on.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists