Page MenuHomeFreeBSD

Add a delay_tsc() static function for when DELAY() uses the TSC.
ClosedPublic

Authored by jhb on Nov 5 2018, 6:12 PM.
Tags
None
Referenced Files
F167948318: D17850.id.diff
Tue, Aug 25, 2:08 PM
F167943452: D17850.diff
Tue, Aug 25, 1:28 PM
F167933259: D17850.id50044.diff
Tue, Aug 25, 12:15 PM
Unknown Object (File)
Mon, Aug 24, 9:16 AM
Unknown Object (File)
Sun, Aug 23, 8:07 AM
Unknown Object (File)
Sat, Aug 22, 12:29 AM
Unknown Object (File)
Fri, Aug 21, 2:03 PM
Unknown Object (File)
Sun, Aug 16, 2:15 AM
Subscribers

Details

Summary

This uses slightly simpler logic than the existing code by using the
full 64-bit counter and thus not having to worry about counter overflow.

Test Plan
  • passed make tinderbox (aside from unrelated breakage in arm.GENERIC-NODEBUG)
  • booted in i386 and amd64 VMs
  • original PR reporter booted combined patch on amd64 machine

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 20645
Build 20061: arc lint + arc unit

Event Timeline

sys/x86/x86/delay.c
59–70

Please add a comment explaining why sched_pin() is needed.

81

Perhaps there another comment is needed, noting that tsc_is_invariant check prevent too long delays.

jhb marked 2 inline comments as done.Nov 5 2018, 9:44 PM
This revision is now accepted and ready to land.Nov 5 2018, 9:59 PM
This revision was automatically updated to reflect the committed changes.