[CFR] Kevent timer improvements

Baptiste Daroussin bapt at freebsd.org
Sun Apr 13 19:19:35 UTC 2014


On Sun, Apr 13, 2014 at 05:20:28PM +0300, Konstantin Belousov wrote:
> On Sun, Apr 13, 2014 at 03:15:51PM +0200, Baptiste Daroussin wrote:
> > I have splitted my patch in multiple parts, let start with the first one:
> > adding NOTE_NSECONDS, NOTE_USECONDS, NOTE_NSECONDS
> > 
> > http://people.freebsd.org/~bapt/kevent_timer.diff
> 
[...]
> > +	else if (flags & NOTE_NSECONDS)
> > +		modifier = SBT_1NS;
> It is better to put the 'modifier = SBT_1MS;' statement as the else part.
> 
> That said, IMO it would be sometimes beneficial to have real flag to
> specify milliseconds precision, in addition to milliseconds be the
> default.

Done in the new patch
> > +
> > +		    timer2sbintime(kn->kn_sdata, kn->kn_sfflags), 0 /* 1ms? */,
> There, at least the comment about precision should be updated.
> But, it seems that for the seconds precision, it makes sense to
> specify e.g. 1/2 sec as precision; or add an API flag to allow imprecise
> callout scheduling.
> 
While I do agree this might be useful I do not have time to work on that right
now so I just removed the comment which wasn't really accurate anyway.

Is that ok?

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kevent_timer.diff
Type: text/x-diff
Size: 3266 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140413/1d1ee323/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140413/1d1ee323/attachment.sig>


More information about the freebsd-hackers mailing list