lkml.org 
[lkml]   [2021]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC clocksource 2/5] clocksource: Retry clock read if long delays detected
From
Date
On Tue, 2021-01-05 at 16:41 -0800, paulmck@kernel.org wrote:
>
> @@ -203,7 +204,6 @@ static void
> clocksource_watchdog_inject_delay(void)
> injectfail = inject_delay_run;
> if (!(++injectfail / inject_delay_run % inject_delay_freq)) {
> printk("%s(): Injecting delay.\n", __func__);
> - injectfail = 0;
> for (i = 0; i < 2 * WATCHDOG_THRESHOLD / NSEC_PER_MSEC;
> i++)
> udelay(1000);

Wait, patch 1 just added that line?

Should patch 1 not add it and this
patch go without
this removal? :)

+ wdagain_nsec = clocksource_cyc2ns(delta, watchdog-
>mult, watchdog->shift);
+ if (wdagain_nsec < 0 || wdagain_nsec >
WATCHDOG_MAX_SKEW) {
+ wderr_nsec = wdagain_nsec;
+ if (nretries++ < max_read_retries)
+ goto retry;
+ }

Given that clocksource_cyc2ns uses unsigned multiplication
followed by a right shift, do we need to test for <0?

\
 
 \ /
  Last update: 2021-01-06 17:29    [W:1.952 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site