Page MenuHomeFreeBSD

Remove the deprecated timeout(9) interface.
ClosedPublic

Authored by jhb on Nov 28 2019, 8:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 16 2024, 11:27 AM
Unknown Object (File)
Dec 20 2023, 3:16 AM
Unknown Object (File)
Dec 15 2023, 6:38 PM
Unknown Object (File)
Dec 12 2023, 10:17 PM
Unknown Object (File)
Dec 2 2023, 4:11 PM
Unknown Object (File)
Dec 2 2023, 4:11 PM
Unknown Object (File)
Dec 2 2023, 4:11 PM
Unknown Object (File)
Dec 2 2023, 4:11 PM

Details

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 - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27846
Build 26023: arc lint + arc unit

Event Timeline

Will need a __FreeBSD_version bump probably.

sys/kern/kern_timeout.c
386–391

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.

1327

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?

  • Drop unrelated crypto.9 diff.
share/man/man9/callout.9
92

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
386–391

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 inline comments.
share/man/man9/callout.9
804–806

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

sys/kern/kern_timeout.c
1327

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.Dec 11 2019, 12:25 AM

Rebase, flesh out HISTORY.

This revision is now accepted and ready to land.Dec 11 2019, 11:08 AM
markj added inline comments.
share/man/man9/callout.9
33

The date change looks wrong.

sys/kern/kern_timeout.c
940

"allow migration"?

jhb marked 2 inline comments as done.Dec 13 2019, 8:52 PM
jhb added inline comments.
share/man/man9/callout.9
33

Oops, that's due to how I rebased this tree (by copying the old one off and pulling in the updated timeout.9 after the callout_func_t commit then copying this back over). I will bump it to the real date at commit time.

This revision was automatically updated to reflect the committed changes.
jhb marked an inline comment as done.