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

From: Feng Tang
Date: Sun Mar 17 2024 - 22:11:41 EST


On Sun, Mar 17, 2024 at 10:03:38PM -0400, Waiman Long wrote:
>
> 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?

Yes, you are right. will fix it. non-boot CPU means AP (application
processor) here.

>
> Other than that, the patch looks reasonable to me.

Thanks for the review!

- Feng

> Thanks,
> Longman
>
>