From owner-freebsd-current Wed Apr 28 2:12:34 1999 Delivered-To: freebsd-current@freebsd.org Received: from ns.oeno.com (ns.oeno.com [194.100.99.145]) by hub.freebsd.org (Postfix) with SMTP id D5F3814E61 for ; Wed, 28 Apr 1999 02:12:32 -0700 (PDT) (envelope-from will@ns.oeno.com) Received: (qmail 6961 invoked by uid 1001); 28 Apr 1999 09:12:30 -0000 Date: 28 Apr 1999 09:12:30 -0000 Message-ID: <19990428091230.6958.qmail@ns.oeno.com> From: Ville-Pertti Keinonen To: current@freebsd.org Subject: Patch affecting vnode identification and name cache - please test Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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