Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 1997 16:43:21 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        current@freebsd.org
Subject:   DISCUSS: vnode references as open instances
Message-ID:  <199704032343.QAA17773@phaeton.artisoft.com>

next in thread | raw e-mail | index | archive | help
I am looking for discussion, pro and con.

-----------------------------------------------------------------------------

I believe that vnode references should be treated as counting
semaphores.

Currently, reference holders are net required to count references
in all cases.

The purpose of this change would be to significantly clean up
the vnode reference interactions to provide a meaningful
seperation between vnode maintenance and vnode reclamation,
with the eventual intention of removing the need for vclean()
and the duplication of code in each per FS VOP_LOCK implementation.


This change would affect the directory name lookup cache code
(for which a vnode reference in a cache would be very much the
same as an open instance for a vnode reference by a system open
file table reference), as well as several other subsystems.


Though vnodes are currently globally accounted, I beleive that
there should be a per FS interface, initially to the global
accounting interface, for freeing vnodes in an FS specific
manner.

The eventual intent of this change is to allow per-FS management
of vnodes as part of the FS's [*,i]node pool, and to therefore
relieve the need for global vnode pool management, and thus global
recovery of vnodes for reuse.


This would be similar in scope to the SVR4 vnode management scheme,
as described in "The Magic Garden Explained" and the _Bach_ book.


One large benefit of this technique would be to allow the recovery
of unreferenced vnodes from per FS "second chance" caches, like
the FFS "ihash" facility, and therfore the recovery of perfectly
valid memory pages that refere to a referenced per FS object.

Currently, there is no recovery mechanism whereby the valid pages
can be re-referenced for use once the vnode had been disassociated
from the per-FS object, but not from the valid pages.

When a reference which references these pages occurs, the data,
though in core, cannot be reclaimed, and must be reread from
disk.

-----------------------------------------------------------------------------


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704032343.QAA17773>