[RESEND PATCH v2 1/2] watchdog/perf: Provide function for adjusting the event period
Doug Anderson
dianders at chromium.org
Wed Jun 25 15:46:31 PDT 2025
Hi,
On Thu, Jun 19, 2025 at 4:48 AM Yicong Yang <yangyicong at huawei.com> wrote:
>
> From: Yicong Yang <yangyicong at hisilicon.com>
>
> Architecture's using perf events for hard lockup detection needs to
> convert the watchdog_thresh to the event's period, some architecture
> for example arm64 perform this conversion using the CPU's maximum
> frequency which will be acquired by cpufreq. However by the time
> the lockup detector's initialized the cpufreq driver may not be
> initialized, thus launch a watchdog with inaccurate period. Provide
> a function hardlockup_detector_perf_adjust_period() to allowing
> adjust the event period. Then architecture can update with more
> accurate period if cpufreq is initialized.
>
> Signed-off-by: Yicong Yang <yangyicong at hisilicon.com>
> ---
> include/linux/nmi.h | 2 ++
> kernel/watchdog_perf.c | 23 +++++++++++++++++++++++
> 2 files changed, 25 insertions(+)
I looked at v1 a long time ago and my nit has been fixed, so:
Reviewed-by: Douglas Anderson <dianders at chromium.org>
More information about the linux-arm-kernel
mailing list