Skip to content

Commit

Permalink
vfs cache: add 2 more optimizaiton ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
mjguzik committed Oct 5, 2023
1 parent cd2105d commit 8b62217
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sys/kern/vfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,20 @@
* It could become part of the API contract to *always* have a rootvnode set in
* mnt_rootvnode. Such vnodes are annotated with VV_ROOT and vnlru would have
* to be modified to always skip them.
*
* === inactive on v_usecount reaching 0
*
* VOP_NEED_INACTIVE should not exist. Filesystems would indicate need for such
* processing with a bit in usecount.
*
* === v_holdcnt
*
* Hold count should probably get eliminated, but one can argue it is a useful
* feature. Even if so, handling of v_usecount could be decoupled from it --
* vnlru et al would consider the vnode not-freeable if has either hold or
* usecount on it.
*
* This would eliminate 2 atomics.
*/

static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
Expand Down

0 comments on commit 8b62217

Please sign in to comment.