From owner-cvs-all Tue Jul 20 2:49:42 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id B409C151AB; Tue, 20 Jul 1999 02:49:38 -0700 (PDT) (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA01573; Tue, 20 Jul 1999 02:47:57 -0700 (PDT) (envelope-from phk@FreeBSD.org) Message-Id: <199907200947.CAA01573@freefall.freebsd.org> From: Poul-Henning Kamp Date: Tue, 20 Jul 1999 02:47:57 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/dev/vn vn.c src/sys/kern kern_conf.c vfs_subr.c src/sys/miscfs/specfs spec_vnops.c specdev.h src/sys/sys conf.h param.h types.h vnode.h src/sys/ufs/mfs mfs_vfsops.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk phk 1999/07/20 02:47:56 PDT Modified files: sys/dev/vn vn.c sys/kern kern_conf.c vfs_subr.c sys/miscfs/specfs spec_vnops.c specdev.h sys/sys conf.h param.h types.h vnode.h sys/ufs/mfs mfs_vfsops.c Log: Now a dev_t is a pointer to struct specinfo which is shared by all specdev vnodes referencing this device. Details: cdevsw->d_parms has been removed, the specinfo is available now (== dev_t) and the driver should modify it directly when applicable, and the only driver doing so, does so: vn.c. I am not sure the logic in checking for "<" was right before, and it looks even less so now. An intial pool of 50 struct specinfo are depleted during early boot, after that malloc had better work. It is likely that fewer than 50 would do. Hashing is done from udev_t to dev_t with a prime number remainder hash, experiments show no better hash available for decent cost (MD5 is only marginally better) The prime number used should not be close to a power of two, we use 83 for now. Add new checkalias2() to get around the loss of info from dev2udev() in bdevvp(); The aliased vnodes are hung on a list straight of the dev_t, and speclisth[SPECSZ] is unused. The sharing of struct specinfo means that the v_specnext moves into the vnode which grows by 4 bytes. Don't use a VBLK dev_t which doesn't make sense in MFS, now we hang a dummy cdevsw on B/Cmaj 253 so that things look sane. Storage overhead from all of this is O(50k). Bump __FreeBSD_version to 400009 The next step will add the stuff needed so device-drivers can start to hang things from struct specinfo Revision Changes Path 1.81 +6 -41 src/sys/dev/vn/vn.c 1.51 +51 -25 src/sys/kern/kern_conf.c 1.213 +38 -51 src/sys/kern/vfs_subr.c 1.90 +1 -2 src/sys/miscfs/specfs/spec_vnops.c 1.18 +6 -8 src/sys/miscfs/specfs/specdev.h 1.67 +2 -2 src/sys/sys/conf.h 1.51 +2 -2 src/sys/sys/param.h 1.35 +4 -2 src/sys/sys/types.h 1.91 +8 -3 src/sys/sys/vnode.h 1.66 +26 -3 src/sys/ufs/mfs/mfs_vfsops.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message