[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150310135728.GA31415@leverpostej>
Date: Tue, 10 Mar 2015 13:57:29 +0000
From: Mark Rutland <mark.rutland@....com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Suzuki Poulose <Suzuki.Poulose@....com>,
Will Deacon <Will.Deacon@....com>,
"linux@....linux.org.uk" <linux@....linux.org.uk>,
"acme@...nel.org" <acme@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Punit Agrawal <Punit.Agrawal@....com>,
Pawel Moll <Pawel.Moll@....com>
Subject: Re: [PATCH 1/3] arm/pmu: Reject groups spanning multiple hardware
PMUs
> So the problem is that event_init() is what will return the pmu, so we
> cannot make decisions on it until after that returns.
I took a look into hacking something into perf_try_init_event, but it
ends up duplicating all of the existing tests and looks really out of
place.
> Maybe we can pull out the validate step into its own funciton;
> pmu->validate() or whatnot, to be called slightly later.
Perhaps the other way around: move the call to pmu::event_init() later
(after the other checks in perf_event_open), and in its original spot
add a new pmu::can_handle() that only tells us whether an event in
isolation is for this PMU, without validation of the specifics of the
event.
That would keep the split between the two callbacks more clearly
defined, though it would require updating most PMU drivers, so perhaps
that's too invasive.
I'll dig into this a bit.
Mark.
--
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