openzfsonwindows / openzfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
402 stars 15 forks source link

vflush: Speed up reclaim by doing less in the loop #327

Closed EchterAgo closed 7 months ago

EchterAgo commented 7 months ago

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.

EchterAgo commented 7 months ago

Oooops