Re: [PATCH] x86/tsc: Use topology_max_packages() to get package number

From: Waiman Long
Date: Sun Mar 17 2024 - 22:04:26 EST



On 3/15/24 07:26, Feng Tang wrote:
Commit b50db7095fe0 ("x86/tsc: Disable clocksource watchdog for TSC
on qualified platorms") was introduced to solve problem that
sometimes TSC clocksource is wrongly judged as unstable by watchdog
like 'jiffies', HPET, etc.

In it, the hardware package number is a key factor for judging whether
to disable the watchdog for TSC, and 'nr_online_nodes' was chosen as
an estimation due to it is needed in early boot phase before
registering 'tsc-early' clocksource, where all none-boot CPUs are not

"none-boot"? You mean "non-boot". Right?

Other than that, the patch looks reasonable to me.

Thanks,
Longman