forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 18
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
lundman
merged 2 commits into
openzfsonwindows:zfs-Windows-2.2.0-release
from
EchterAgo:timer_improvement
Nov 10, 2023
Merged
spl-time: Use KeQueryPerformanceCounter instead of KeQueryTickCount #326
lundman
merged 2 commits into
openzfsonwindows:zfs-Windows-2.2.0-release
from
EchterAgo:timer_improvement
Nov 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maybe I should remove |
EchterAgo
force-pushed
the
timer_improvement
branch
from
November 9, 2023 15:43
60ca19a
to
c38529b
Compare
I also noticed the performance benchmarks for checksums / raidz parity use this to select an algorithm, should make the results more accurate. |
Maybe we should assert for |
lundman
approved these changes
Nov 9, 2023
I added the |
lundman
reviewed
Nov 10, 2023
EchterAgo
force-pushed
the
timer_improvement
branch
3 times, most recently
from
November 10, 2023 05:34
93bcad5
to
e756236
Compare
`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]>
One less division for each call. Signed-off-by: Axel Gembe <[email protected]>
EchterAgo
force-pushed
the
timer_improvement
branch
from
November 10, 2023 05:37
e756236
to
c318c73
Compare
lundman
merged commit Nov 10, 2023
3c86648
into
openzfsonwindows:zfs-Windows-2.2.0-release
7 checks passed
lundman
pushed a commit
that referenced
this pull request
Dec 11, 2023
…326) * 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]> * spl-time: Add assertion to gethrtime and cache NANOSEC / freq division One less division for each call. Signed-off-by: Axel Gembe <[email protected]> --------- Signed-off-by: Axel Gembe <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andrandom_get_bytes
to useKeQueryPerformanceCounter
.On my system this gives a 100ns resolution.