From owner-freebsd-current@FreeBSD.ORG Tue Jun 3 06:47:20 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F00F437B404; Tue, 3 Jun 2003 06:47:19 -0700 (PDT) Received: from mx0.freebsd-services.com (survey.codeburst.net [195.149.39.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47E8943F3F; Tue, 3 Jun 2003 06:47:19 -0700 (PDT) (envelope-from paul@freebsd-services.com) Received: by mx0.freebsd-services.com (Postfix, from userid 1002) id 3706F1B212; Tue, 3 Jun 2003 14:47:18 +0100 (BST) Date: Tue, 3 Jun 2003 14:47:18 +0100 From: Paul Richards To: Hiten Pandya Message-ID: <20030603134717.GD35187@survey.codeburst.net> References: <20030602014757.GA99626@perrin.int.nxad.com> <3EDB6A6F.827B7C22@mindspring.com> <20030602160411.GA24490@perrin.int.nxad.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030602160411.GA24490@perrin.int.nxad.com> User-Agent: Mutt/1.5.4i cc: current@FreeBSD.ORG cc: des@FreeBSD.ORG Subject: Re: VFS: C99 sparse format for struct vfsops X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2003 13:47:20 -0000 On Mon, Jun 02, 2003 at 09:04:11AM -0700, Hiten Pandya wrote: > On Mon, Jun 02, 2003 at 08:17:03AM -0700, Terry Lambert wrote: > > Hiten Pandya wrote: > > > My fingers have been itching to do this since the day phk@ planted this > > > idea in my brain (re: cdevsw initialisations). Basically, it changes > > > the vfsops to use C99 sparse format, just like cdevsw. It removes a lot > > > of junk default initialisations, and duplication. > > > > I really dislike the changes to vfs_init(). Specifically, it's > > not the overhead, so much as it's the implied side effects. > > And how many times is vfc_register() called? Its not in the > patch of an I/O operation or anything. Its just a mount time > overhead which will go through -- a one time thing. > > > Consider this going forward: someone adds a new VFSOP to the > > list of allowable VFSOPs, and the vfs_init() doesn't have any > > specific code for it. You should look at kobj, it's precisely this sort of dynamic dispatching that it was designed to support. -- Tis a wise thing to know what is wanted, wiser still to know when it has been achieved and wisest of all to know when it is unachievable for then striving is folly. [Magician]