Re: [PATCH v10 clocksource 1/7] clocksource: Provide module parameters to inject delays in watchdog

From: Paul E. McKenney
Date: Mon Apr 26 2021 - 12:14:28 EST


On Mon, Apr 26, 2021 at 09:00:08AM -0700, Andi Kleen wrote:
> > Boot-time coverage is important, as we saw in kbuild test robot testing
> > of v9 of this patchset, which triggered clocksource_tsc_early, but not
> > clocksource_tsc. Note that v10 avoids this triggering.
>
> Not sure how that could happen, I didn't think the kbuild bot knows
> how to set these options.

It didn't need to. My initial choice of maximum skew in the v9 patch
series exceeded what clocksource_tsc_early could remain within, given its
quick calibration. In v10 of this patch series, clocksource_tsc_early
is given special dispensation.

> Overall I think you should follow the existing frame works instead
> of inventing your own so that things can be later tested in an
> uniform manner.
>
> Perhaps the fault injection framework needs boot options, but
> they should be generic.

>From Documentation/fault-injection/fault-injection.rst:

------------------------------------------------------------------------

- module parameters

If the scope of the fault injection capability is limited to a
single kernel module, it is better to provide module parameters to
configure the fault attributes.

------------------------------------------------------------------------

And in this case, the fault injection capability is in fact limited to
kernel/clocksource.c.

Thanx, Paul