Skip to content

Commit 8b62217

Browse files
committed
vfs cache: add 2 more optimizaiton ideas
1 parent cd2105d commit 8b62217

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sys/kern/vfs_cache.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,20 @@
276276
* It could become part of the API contract to *always* have a rootvnode set in
277277
* mnt_rootvnode. Such vnodes are annotated with VV_ROOT and vnlru would have
278278
* to be modified to always skip them.
279+
*
280+
* === inactive on v_usecount reaching 0
281+
*
282+
* VOP_NEED_INACTIVE should not exist. Filesystems would indicate need for such
283+
* processing with a bit in usecount.
284+
*
285+
* === v_holdcnt
286+
*
287+
* Hold count should probably get eliminated, but one can argue it is a useful
288+
* feature. Even if so, handling of v_usecount could be decoupled from it --
289+
* vnlru et al would consider the vnode not-freeable if has either hold or
290+
* usecount on it.
291+
*
292+
* This would eliminate 2 atomics.
279293
*/
280294

281295
static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,

0 commit comments

Comments
 (0)