Skip site navigation (1)Skip section navigation (2)
Date:      28 Apr 1999 09:12:30 -0000
From:      Ville-Pertti Keinonen <will@iki.fi>
To:        current@freebsd.org
Subject:   Patch affecting vnode identification and name cache - please test
Message-ID:  <19990428091230.6958.qmail@ns.oeno.com>

next in thread | raw e-mail | index | archive | help

This small patch doesn't fix any major bugs (mostly the XXX in the
comment before cache_purge in kern/vfs_cache.c), but should be a step
towards allowing a dynamically sized vnode cache to be used.  This is
done by eliminating the reliance on a vnode pointer/v_id pair as a
unique identification for an arbitrary vnode over arbitrary periods of
time and without holding references.

It needs to be tested for reliability (in particular, look for leaks
in free vnodes).  You can get the unified diffs against -current
(kern/vfs_cache.c 1.39, kern/vfs_subr.c 1.189) from
http://www.hut.fi/~will/freebsd_v_id.diff

Please send success/failure reports.  Comments on the approach are
also welcome, I've only discussed this with phk so far.

The following things are changed:

    - A reference is held by v_dd to prevent the referenced vnode from
being reused (this is currently prevented in most cases because of the
v_cache_src link, so it doesn't make behavior worse, only more
deterministic).

    - The v_id is used as a version number, rather than a (supposedly)
unique identifier, and incremented locally.  This should make the
probability of wrapping during the uses of v_id other than v_ddid
insignificant (it would have to occur during a single wait for a lock
on the vnode).

    - The vnode pointer is used in NCHHASH rather than v_id, which is
no longer globally unique, even most of the time.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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