On Mon, Jan 21, 2019 at 04:59:38AM +0100, Claudio Jeker wrote:
> On Sat, Jan 12, 2019 at 10:40:35PM -0600, Amit Kulkarni wrote:
> > > [...]
> >
> > Thanks for the feedback Claudio and Mark!
> >
> > Here is a new diff based on your suggestions, [...]
> >
> > diff --git sys/arch/armv7/exynos/exuart.c sys/arch/armv7/exynos/exuart.c
> > index 4b0588750ea..15086bc5976 100644
> > --- sys/arch/armv7/exynos/exuart.c
> > +++ sys/arch/armv7/exynos/exuart.c
> > @@ -283,7 +283,7 @@ exuart_intr(void *arg)
> > [...]
>
> This one is OK.
>
> > diff --git sys/arch/sparc64/dev/fd.c sys/arch/sparc64/dev/fd.c
> > index 8d548062f83..654d8c95524 100644
> > --- sys/arch/sparc64/dev/fd.c
> > +++ sys/arch/sparc64/dev/fd.c
> > @@ -1632,7 +1632,7 @@ loop:
> > fdc->sc_state = RECALCOMPLETE;
> > if (fdc->sc_flags & FDC_NEEDHEADSETTLE) {
> > /* allow 1/30 second for heads to settle */
> > - timeout_add(&fdc->fdcpseudointr_to, hz / 30);
> > + timeout_add_msec(&fdc->fdcpseudointr_to, 33);
> > return (1); /* will return later */
> > }
> >
>
> Wonder if this should be 30 or 40 since 33 is rather odd.
The intent was to wait a 30th of a second. In practice it has always
fired 30ms hence. It's a magic number, so I'd just call it 30ms.
miod might have an opinion on whether those extra milliseconds would
be useful in the event that sparc64 is ever able to timeout with
millisecond or better precision on OpenBSD.
> > diff --git sys/dev/fdt/imxuart.c sys/dev/fdt/imxuart.c
> > index 84c7eb5aee6..c2fd7e4a6d3 100644
> > --- sys/dev/fdt/imxuart.c
> > +++ sys/dev/fdt/imxuart.c
> > @@ -228,7 +228,7 @@ imxuart_intr(void *arg)
> > [...]
>
> > diff --git sys/net/if_pppoe.c sys/net/if_pppoe.c
> > index e55316351fd..9e03310714b 100644
> > --- sys/net/if_pppoe.c
> > +++ sys/net/if_pppoe.c
> > @@ -1346,7 +1346,7 @@ pppoe_tlf(struct sppp *sp)
> > * function and defer disconnecting to the timeout handler.
> > */
> > sc->sc_state = PPPOE_STATE_CLOSING;
> > - timeout_add(&sc->sc_timeout, hz / 50);
> > + timeout_add_msec(&sc->sc_timeout, 20);
> > }
> >
> > static void
>
> I would wait with this one, since there are many more timeout_add() in the
> file that also should be converted.
Agreed.
> Anyone else wants to comment on this or give me an OK?
You're ok cheloha@ math-wise. But sparc64 is greek to me so
caveat emptor.