Page MenuHomeFreeBSD

Remove the deprecated timeout(9) interface.
AcceptedPublic

Authored by jhb on Thu, Nov 28, 8:49 PM.

Details

Reviewers
kib
markj
Group Reviewers
manpages
Summary

All in-tree consumers have been converted to callout(9).

Test Plan
  • make tinderbox
  • booted amd64 in a VM

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 28070
Build 26215: arc lint + arc unit

Event Timeline

jhb created this revision.Thu, Nov 28, 8:49 PM
jhb added a comment.Thu, Nov 28, 8:53 PM

Will need a __FreeBSD_version bump probably.

sys/kern/kern_timeout.c
391–396

It is not clear if we want to really treat the soft clock thread on CPU 0 different going forward. If not, we would retire cc_default_cpu using PCPU_GET(cpuid) instead and merge these two tunable to be a single tunable perhaps.

1330

For this commit I should drop the XXX, however, there is an open question I think perhaps as a followup if we should not force timeouts onto CPU 0 but just let them use whatever CPU they are created on as the default?

jhb updated this revision to Diff 65027.Thu, Nov 28, 8:53 PM
  • Drop unrelated crypto.9 diff.
kib added inline comments.Thu, Nov 28, 10:06 PM
share/man/man9/callout.9
95

This looks very much as a material for other commit ('remove timeout_t typedef'), but again it raises a question why remove this useful typedef.

sys/kern/kern_timeout.c
391–396

I do not see much sense in cc_default_cpu. We use curcpu for callouts otherwise, and I believe we should just extend the practice there.

cem added a subscriber: cem.Fri, Nov 29, 3:01 AM
cem added inline comments.
share/man/man9/callout.9
811–813

Maybe throw a reference in a .Sh HISTORY section? Not a big deal.

sys/kern/kern_timeout.c
1330

There may be some power saving benefit on (relatively common) 2-4? 8? core mobile hardware of coalescing callouts onto a single core, because you can wake fewer cores less often.

On the other hand, on big machines with a lot of callouts you can make a big queue on cpu 0. I might coalesce nonspecific callouts to cpu % 4 or cpu % 8 to sort of meet halfway? I haven't thought that through thoroughly.

jhb marked an inline comment as done.Wed, Dec 11, 12:25 AM
jhb updated this revision to Diff 65481.Wed, Dec 11, 12:28 AM

Rebase, flesh out HISTORY.

kib accepted this revision.Wed, Dec 11, 11:08 AM
This revision is now accepted and ready to land.Wed, Dec 11, 11:08 AM
markj accepted this revision.Wed, Dec 11, 2:26 PM
markj added inline comments.
share/man/man9/callout.9
32

The date change looks wrong.

sys/kern/kern_timeout.c
943

"allow migration"?