Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Miod Vallat
> 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

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Scott Cheloha
On Mon, Jan 21, 2019 at 09:05:19PM -0500, Ted Unangst wrote: > Scott Cheloha wrote: > > > > 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

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Ted Unangst
Scott Cheloha wrote: > > > 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; > > >

Re: replacing timeout_add() with timeout_add_msec()

2019-01-21 Thread Scott Cheloha
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

Re: replacing timeout_add() with timeout_add_msec()

2019-01-20 Thread Claudio Jeker
On Sat, Jan 12, 2019 at 10:40:35PM -0600, Amit Kulkarni wrote: > > You started to convert the wrong timeout_add() calls. Doing a blind > > timeout_add() to timeout_add_msec() conversion especially on calls with 0 > > or 1 tick sleep time is the wrong approach. > > The right approach is to identify

Re: replacing timeout_add() with timeout_add_msec()

2019-01-12 Thread Amit Kulkarni
> You started to convert the wrong timeout_add() calls. Doing a blind > timeout_add() to timeout_add_msec() conversion especially on calls with 0 > or 1 tick sleep time is the wrong approach. > The right approach is to identify calls that do sleep for a well defined time > (1sec, 50ms or whatever)

Re: replacing timeout_add() with timeout_add_msec()

2019-01-07 Thread Mark Kettenis
> Date: Sun, 6 Jan 2019 21:46:01 -0600 > From: Amit Kulkarni > > > > Even on amd64, I won't be able to test, because of missing hardware. > > > If you think something is wrong, please will you let me have your > > > feedback? > > > > I'm a bit stunned at the zeal to push untested diffs into the

Re: replacing timeout_add() with timeout_add_msec()

2019-01-06 Thread Claudio Jeker
On Sun, Jan 06, 2019 at 01:43:19PM -0600, Amit Kulkarni wrote: > Hi, > > Referring to the end of mpi's message, and also mlarkin@ later comment > https://marc.info/?l=openbsd-tech=154577028830964=2 > > I am trying to replace some easy timeout_add() calls with timeout_add_msec(). > > My current

Re: replacing timeout_add() with timeout_add_msec()

2019-01-06 Thread Amit Kulkarni
> > Even on amd64, I won't be able to test, because of missing hardware. > > If you think something is wrong, please will you let me have your > > feedback? > > I'm a bit stunned at the zeal to push untested diffs into the tree > > (you didn't ask anyone to test it for you) I requested for

Re: replacing timeout_add() with timeout_add_msec()

2019-01-06 Thread Theo de Raadt
Amit Kulkarni wrote: > Even on amd64, I won't be able to test, because of missing hardware. > If you think something is wrong, please will you let me have your > feedback? I'm a bit stunned at the zeal to push untested diffs into the tree (you didn't ask anyone to test it for you)

Re: replacing timeout_add() with timeout_add_msec()

2019-01-06 Thread Amit Kulkarni
Even on amd64, I won't be able to test, because of missing hardware. If you think something is wrong, please will you let me have your feedback? Thanks On Sun, Jan 6, 2019 at 4:56 PM Theo de Raadt wrote: > > Amit Kulkarni wrote: > > > Hi, > > > > Referring to the end of mpi's message, and

Re: replacing timeout_add() with timeout_add_msec()

2019-01-06 Thread Theo de Raadt
Amit Kulkarni wrote: > Hi, > > Referring to the end of mpi's message, and also mlarkin@ later comment > https://marc.info/?l=openbsd-tech=154577028830964=2 > > I am trying to replace some easy timeout_add() calls with timeout_add_msec(). > > My current understanding with the occurences of

replacing timeout_add() with timeout_add_msec()

2019-01-06 Thread Amit Kulkarni
Hi, Referring to the end of mpi's message, and also mlarkin@ later comment https://marc.info/?l=openbsd-tech=154577028830964=2 I am trying to replace some easy timeout_add() calls with timeout_add_msec(). My current understanding with the occurences of timeout_add() in the tree is that: if