forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vflush: Speed up reclaim by doing less in the loop (#328)
* 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]> * vflush: Print reclaim statistics This shows how many reclaims have been processed in thousand increments and also how many reclaims are processed per second. Signed-off-by: Axel Gembe <[email protected]> * vflush: Speed up reclaim by doing less in the loop This removes leaving the `vnode_all_list_lock` in the loop as that is not needed. It also only enters the `v_mutex` of nodes that are not `VNODE_DEAD` yet. This converts part of the loop to a new function called `flush_file_objects` to make it more readable. This also removes the restart of the loop, which is safe because `vnode_all_list_lock` is never unlocked. Signed-off-by: Axel Gembe <[email protected]> --------- Signed-off-by: Axel Gembe <[email protected]>
- Loading branch information
Showing
1 changed file
with
123 additions
and
104 deletions.
There are no files selected for viewing
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