lkml.org 
[lkml]   [2019]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH v4 12/21] watchdog/hardlockup/hpet: Adjust timer expiration on the number of monitored CPUs
    On Tue, Jun 11, 2019 at 10:11:04PM +0200, Thomas Gleixner wrote:
    > On Thu, 23 May 2019, Ricardo Neri wrote:
    > > @@ -52,10 +59,10 @@ static void kick_timer(struct hpet_hld_data *hdata, bool force)
    > > return;
    > >
    > > if (hdata->has_periodic)
    > > - period = watchdog_thresh * hdata->ticks_per_second;
    > > + period = watchdog_thresh * hdata->ticks_per_cpu;
    > >
    > > count = hpet_readl(HPET_COUNTER);
    > > - new_compare = count + watchdog_thresh * hdata->ticks_per_second;
    > > + new_compare = count + watchdog_thresh * hdata->ticks_per_cpu;
    > > hpet_set_comparator(hdata->num, (u32)new_compare, (u32)period);
    >
    > So with this you might get close to the point where you trip over the SMI
    > induced madness where CPUs vanish for several milliseconds in some value
    > add code. You really want to do a read back of the hpet to detect that. See
    > the comment in the hpet code. RHEL 7/8 allow up to 768 logical CPUs....

    Do you mean adding a readback to check if the new compare value is
    greater than the current count? Similar to the check at the end of
    hpet_next_event():

    return res < HPET_MIN_CYCLES ? -ETIME : 0;

    In such a case, should it try to set the comparator again? I think it
    should, as otherwise the hardlockup detector would stop working.

    Thanks and BR,
    Ricardo
    >
    > Thanks,
    >
    > tglx

    \
     
     \ /
      Last update: 2019-06-19 00:48    [W:8.268 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site