Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spl-time: Use KeQueryPerformanceCounter instead of KeQueryTickCount #326

Merged

Commits on Nov 10, 2023

  1. spl-time: Use KeQueryPerformanceCounter instead of KeQueryTickCount

    `KeQueryTickCount` seems to only have a 15.625ms resolution unless the
    interrupt timer frequency is increased, which should be avoided due to
    power usage.
    
    Instead, this switches the `zfs_lbolt`, `gethrtime` and
    `random_get_bytes` to use `KeQueryPerformanceCounter`.
    
    On my system this gives a 100ns resolution.
    
    Signed-off-by: Axel Gembe <[email protected]>
    EchterAgo committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    439c171 View commit details
    Browse the repository at this point in the history
  2. spl-time: Add assertion to gethrtime and cache NANOSEC / freq division

    One less division for each call.
    
    Signed-off-by: Axel Gembe <[email protected]>
    EchterAgo committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    c318c73 View commit details
    Browse the repository at this point in the history