lkml.org 
[lkml]   [2021]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/5] kernel/watchdog: adapt the watchdog_hld interface for async model
    On Wed 2021-09-15 11:51:01, Pingfan Liu wrote:
    > When lockup_detector_init()->watchdog_nmi_probe(), PMU may be not ready
    > yet. E.g. on arm64, PMU is not ready until
    > device_initcall(armv8_pmu_driver_init). And it is deeply integrated
    > with the driver model and cpuhp. Hence it is hard to push this
    > initialization before smp_init().
    >
    > But it is easy to take an opposite approach by enabling watchdog_hld to
    > get the capability of PMU async.

    This is another cryptic description. I have probably got it after
    looking at the 5th patch (was not Cc :-(

    > The async model is achieved by introducing an extra parameter notifier
    > of watchdog_nmi_probe().

    I would say that the code is horrible and looks too complex.

    What about simply calling watchdog_nmi_probe() and
    lockup_detector_setup() once again when watchdog_nmi_probe()
    failed in lockup_detector_init()?

    Or do not call lockup_detector_init() at all in
    kernel_init_freeable() when PMU is not ready yet.

    Best Regards,
    Petr

    \
     
     \ /
      Last update: 2021-09-16 10:29    [W:5.136 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site