public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Update the watchdog period according to real CPU frequency
@ 2025-05-12 13:09 Yicong Yang
  2025-05-12 13:09 ` [PATCH v2 1/2] watchdog/perf: Provide function for adjusting the event period Yicong Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yicong Yang @ 2025-05-12 13:09 UTC (permalink / raw)
  To: catalin.marinas, will, akpm, dianders, sumit.garg, kernelfans,
	lecopzer.chen, tglx, song, linux-arm-kernel
  Cc: jonathan.cameron, zhanjie9, prime.zeng, yangyicong, linuxarm

From: Yicong Yang <yangyicong@hisilicon.com>

watchdog perf needs architecture to provide method for converting the watchdog
thresh to counter period. For arm64 we're using the max CPU frequency for
doing the conversion which is from cpufreq driver. But some cpufreq driver
are registered lately, for example cppc_cpufreq will be registered at late
initcall which is after the initialization of watchdog perf (initialized in
armv8_pmuv3 of device initcall). In such case the period of watchdog will not
be accurate enough. Fix this by registering a cpufreq notifier and update the
watchdog period once the cpufreq driver is initialized.

Change since v1:
- Handle the theoretical race condition and other comments from Doug, thanks
Link: https://lore.kernel.org/all/20250307021811.46981-1-yangyicong@huawei.com/

Yicong Yang (2):
  watchdog/perf: Provide function for adjusting the event period
  arm64/watchdog_hld: Add a cpufreq notifier for update watchdog thresh

 arch/arm64/kernel/watchdog_hld.c | 58 ++++++++++++++++++++++++++++++++
 include/linux/nmi.h              |  2 ++
 kernel/watchdog_perf.c           | 23 +++++++++++++
 3 files changed, 83 insertions(+)

-- 
2.24.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-27 19:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 13:09 [PATCH v2 0/2] Update the watchdog period according to real CPU frequency Yicong Yang
2025-05-12 13:09 ` [PATCH v2 1/2] watchdog/perf: Provide function for adjusting the event period Yicong Yang
2025-05-12 23:07   ` Andrew Morton
2025-05-13  7:02     ` Yicong Yang
2025-05-12 13:09 ` [PATCH v2 2/2] arm64/watchdog_hld: Add a cpufreq notifier for update watchdog thresh Yicong Yang
2025-05-12 23:06 ` [PATCH v2 0/2] Update the watchdog period according to real CPU frequency Andrew Morton
2025-05-13  6:51   ` Yicong Yang
2025-06-27 15:26   ` Will Deacon
2025-06-27 18:56     ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox