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
Unknown Object (File)
Fri, Nov 22, 8:44 PM
Unknown Object (File)
Fri, Nov 22, 6:02 PM
Unknown Object (File)
Sun, Nov 17, 9:15 PM
Unknown Object (File)
Sun, Nov 10, 6:34 PM
Unknown Object (File)
Sun, Nov 10, 1:21 AM
Unknown Object (File)
Sun, Nov 10, 12:44 AM
Unknown Object (File)
Sat, Nov 9, 11:28 PM
Unknown Object (File)
Sat, Nov 9, 9:23 PM
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 20641
Build 20057: arc lint + arc unit

Event Timeline

sys/x86/x86/delay.c
59

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

77

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.