[PATCH 1/2] watchdog/perf: Provide function for adjusting the event period

Doug Anderson dianders at chromium.org
Fri Mar 7 08:53:18 PST 2025


Hi,

On Thu, Mar 6, 2025 at 6:18 PM Yicong Yang <yangyicong at huawei.com> wrote:
>
> @@ -211,6 +211,27 @@ void hardlockup_detector_perf_cleanup(void)
>         cpumask_clear(&dead_events_mask);
>  }
>
> +/**
> + * hardlockup_detector_perf_adjust_period - Adjust the events period due
> + *                                          to cpu frequency change
> + */
> +void hardlockup_detector_perf_adjust_period(int cpu, u64 period)

Running `scripts/kernel-doc -v kernel/watchdog_perf.c > /dev/null`
after your patch shows:

kernel/watchdog_perf.c:219: warning: Function parameter or struct
member 'cpu' not described in 'hardlockup_detector_perf_adjust_period'
kernel/watchdog_perf.c:219: warning: Function parameter or struct
member 'period' not described in
'hardlockup_detector_perf_adjust_period'


Other than that, this seems reasonable to me.

...but I'd also have to ask: is there a reason you're using the "perf"
hard-lockup detector instead of the buddy one? In my mind, the "buddy"
watchdog is better in almost all ways (I believe it's lower power,
doesn't waste a "perf" controller, and doesn't suffer from frequency
issues). It's even crossed my mind whether the "perf" lockup detector
should be deprecated. ;-)



More information about the linux-arm-kernel mailing list