Re: [PATCH 1/3] watchdog/softlockup: low-overhead detection of interrupt storm
From: Doug Anderson
Date: Thu Jan 25 2024 - 10:08:38 EST
Hi,
On Thu, Jan 25, 2024 at 12:31 AM Bitao Hu <yaoma@xxxxxxxxxxxxxxxxx> wrote:
>
> > 2. Sum up all 11 of the stats to get a total. This should still fit
> > into 32-bits.
>
> >
> > 3. Do the math to get the integral percentages and store those in the tail slot.
> >
> I'm a bit confused, why is there a need to sum up all 11 of the stats to
> get a total? I calculate the percentage using sample_period.
Oh, you're right! I saw you looping over NR_STATS in print_cpustat()
and assumed that was because you were totaling them. Yeah, using
sample_period should work.
-Doug