Page MenuHomeFreeBSD

time: Allow higher-frequency POSIX timers
Needs ReviewPublic

Authored by tavianator_tavianator.com on Mar 10 2025, 8:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 2:59 AM
Unknown Object (File)
Tue, Oct 7, 10:10 AM
Unknown Object (File)
Thu, Oct 2, 9:27 AM
Unknown Object (File)
Tue, Sep 30, 8:35 AM
Unknown Object (File)
Mon, Sep 22, 9:30 PM
Unknown Object (File)
Sun, Sep 21, 12:48 AM
Unknown Object (File)
Fri, Sep 19, 3:19 PM
Unknown Object (File)
Wed, Sep 17, 7:46 AM
Subscribers

Details

Reviewers
mav
Summary

Commit b5ea3779da42 ("Reduce minimal time intervals of setitimer(2) from
1/HZ to 1/(16*HZ)") changed the minimal interval period for setitimer(2)
but not timer_settime(2). Update itimespecfix() to match itimerfix()
so that POSIX timers have equivalent functionality to the obsolete
setitimer() interface.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 62860
Build 59744: arc lint + arc unit

Event Timeline

(sorry for the lag... this got lost in the shuffle, alas)

This seems reasonable to me.

I added mav@ since he can validate that this is a reasonable change since he did a lot of the tickless work.

While the direction might be OK (I haven't looked close what is that timer), but I see realtimer_settime() calling the itimespecfix() still uses callout_reset(... tvtohz(&tv)), so it won't be able to handle intervals shorter than 1/HZ without bigger modification, similar to the mentioned b5ea3779da42.