From owner-cvs-src@FreeBSD.ORG Tue Feb 22 15:51:08 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F26E116A4CE; Tue, 22 Feb 2005 15:51:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE48E43D39; Tue, 22 Feb 2005 15:51:07 +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 j1MFp7FA054119; Tue, 22 Feb 2005 15:51:07 GMT (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1MFp7TV054118; Tue, 22 Feb 2005 15:51:07 GMT (envelope-from phk) Message-Id: <200502221551.j1MFp7TV054118@repoman.freebsd.org> From: Poul-Henning Kamp Date: Tue, 22 Feb 2005 15:51:07 +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/fs/devfs devfs.h devfs_vnops.c src/sys/kern kern_conf.c vfs_subr.c src/sys/sys conf.h vnode.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2005 15:51:08 -0000 phk 2005-02-22 15:51:07 UTC FreeBSD src repository Modified files: sys/fs/devfs devfs.h devfs_vnops.c sys/kern kern_conf.c vfs_subr.c sys/sys conf.h vnode.h Log: Reap more benefits from DEVFS: List devfs_dirents rather than vnodes off their shared struct cdev, this saves a pointer field in the vnode at the expense of a field in the devfs_dirent. There are often 100 times more vnodes so this is bargain. In addition it makes it harder for people to try to do stypid things like "finding the vnode from cdev". Since DEVFS handles all VCHR nodes now, we can do the vnode related cleanup in devfs_reclaim() instead of in dev_rel() and vgonel(). Similarly, we can do the struct cdev related cleanup in dev_rel() instead of devfs_reclaim(). rename idestroy_dev() to destroy_devl() for consistency. Add LIST_ENTRY de_alias to struct devfs_dirent. Remove v_specnext from struct vnode. Change si_hlist to si_alist in struct cdev. String new devfs vnodes' devfs_dirent on si_alist when we create them and take them off in devfs_reclaim(). Fix devfs_revoke() accordingly. Also don't clear fields devfs_reclaim() will clear when called from vgone(); Let devfs_reclaim() call dev_rel() instead of vgonel(). Move the usecount tracking from dev_rel() to devfs_reclaim(), and let dev_rel() take a struct cdev argument instead of vnode. Destroy SI_CHEAPCLONE devices in dev_rel() (instead of devfs_reclaim()) when they are no longer used. (This should maybe happen in devfs_close() instead.) Revision Changes Path 1.21 +1 -0 src/sys/fs/devfs/devfs.h 1.104 +17 -16 src/sys/fs/devfs/devfs_vnops.c 1.172 +11 -13 src/sys/kern/kern_conf.c 1.585 +0 -2 src/sys/kern/vfs_subr.c 1.211 +3 -2 src/sys/sys/conf.h 1.283 +2 -6 src/sys/sys/vnode.h