[PATCH 01/12] drivers/perf: arm_spe: Store event reserved bits in driver data
Leo Yan
leo.yan at arm.com
Thu Jun 19 09:22:44 PDT 2025
On Thu, Jun 19, 2025 at 12:28:27PM +0100, James Clark wrote:
[...]
> > @@ -77,6 +77,7 @@ struct arm_spe_pmu {
> > u16 pmsver;
> > u16 min_period;
> > u16 counter_sz;
> > + u64 pmsevfr_res0;
>
> IMO this is a premature optimization and we shouldn't store things that are
> only transformations of some other already stored value. It becomes another
> thing to worry about when it's valid to read and to potentially keep it up
> to date etc.
>
> It's just one new one now, but eventually you end up with tons of them and
> then someone forgets to update a dependent one when the parent value changes
> and it makes a mess.
>
> And arm_spe_pmu_event_init() isn't even a particularly hot path.
Makes sense. I will drop this one.
Thanks for suggestions!
Leo
More information about the linux-arm-kernel
mailing list