From owner-cvs-all@FreeBSD.ORG Mon Mar 14 10:01:30 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D1F616A4CE; Mon, 14 Mar 2005 10:01:30 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C6FF43D5A; Mon, 14 Mar 2005 10:01:30 +0000 (GMT) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j2EA1U6P042802; Mon, 14 Mar 2005 10:01:30 GMT (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j2EA1UT2042801; Mon, 14 Mar 2005 10:01:30 GMT (envelope-from phk) Message-Id: <200503141001.j2EA1UT2042801@repoman.freebsd.org> From: Poul-Henning Kamp Date: Mon, 14 Mar 2005 10:01:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/conf files src/sys/sys vnode.h src/sys/kern vfs_hash.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 10:01:30 -0000 phk 2005-03-14 10:01:30 UTC FreeBSD src repository Modified files: sys/conf files sys/sys vnode.h Added files: sys/kern vfs_hash.c Log: Currently (almost) all filesystems maintain a local inode hash table to get from (mount + inode) to vnode. These tables are mostly copy&pasted from UFS, sized based on desiredvnodes and therefore quite large (128K-512K). Several filesystems are buggy enough that they allocate the hash table even before they know if they will ever be used or not. Add "vfs_hash", a system wide hash table, which will replace all the per-filesystem hash-tables. The fields we add to struct vnode will more or less be saved in the respective filesystems inodes. Having one central implementation will save code and will allow us to justify the complexity of code to dynamically (re)size the hash at a later point. Revision Changes Path 1.1005 +1 -0 src/sys/conf/files 1.1 +184 -0 src/sys/kern/vfs_hash.c (new) 1.289 +12 -0 src/sys/sys/vnode.h