Re: [PATCH v3 08/10] perf/core: Introduce pmu->adjust_period() callback
From: Peter Zijlstra
Date: Wed Dec 18 2024 - 08:52:53 EST
On Tue, Dec 10, 2024 at 09:34:47AM +0000, Ravi Bangoria wrote:
> Many hardware PMUs have constraints about sample period. For ex, minimum
> supported sample period for IBS Op PMU is 0x90, the sample period must
> be multiple of 0x10 for IBS Fetch and IBS Op.
>
> Add an optional callback adjust_period() to struct PMU to allow PMU
> specific drivers to adjust sample period calculated by generic code.
> This will ensure the sample_period value will always be valid and no
> additional code is required in PMU specific drivers to re-adjust the
> period.
And not a word about pmu::check_period() and x86_pmu::limit_period() :-(
Please explain why that can't be made to work nor adapted.