From owner-freebsd-current Fri Mar 22 23:24:28 2002 Delivered-To: freebsd-current@freebsd.org Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by hub.freebsd.org (Postfix) with ESMTP id CDB8237B41B; Fri, 22 Mar 2002 23:24:21 -0800 (PST) Received: from pool0002.cvx22-bradley.dialup.earthlink.net ([209.179.198.2] helo=mindspring.com) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 16ofsw-0002xJ-00; Fri, 22 Mar 2002 23:24:19 -0800 Message-ID: <3C9C2D8B.6B1042A2@mindspring.com> Date: Fri, 22 Mar 2002 23:23:55 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: Matthew Dillon , ak03@gte.com, freebsd-current@FreeBSD.ORG, jroberson@chesapeake.net, arr@FreeBSD.ORG, obrien@FreeBSD.ORG Subject: Re: Found: module loading breakage References: <20020323054757.GQ10521@elvis.mu.org> <200203230601.g2N61Km66589@apollo.backplane.com> <3C9C2AFE.376A261A@mindspring.com> <20020323071544.GR10521@elvis.mu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > * Terry Lambert [020322 23:13] wrote: > > Matthew Dillon wrote: > > > Unless I am missing something, vnodes hang off their mount points. > > > So, effectively, there is a system-wide list. > > > > The lock on a global traverasl will be pretty ugly... > > Module loading doesn't occur often. :) The VOP recalculation is to provide a default for new VOPs that are added. I'm not sure it's really necessary, since it's supposed to default to not impliemented, and the lookup for a given descriptor in the list should always get that, if it can't find a matching descriptor. I had a recalculation in my code from 1996 because I sorted the entries, and then used an absolute index (doing this would dereference memory off the end of the list for new VOPs). FreeBSD doesn't make this optimization, and takes the overhead of unpacking and repacking every descriptor, and then doing an extra dereference. So it shouldn't need it. Did this come in as part of the default_vops stuff, which was not part of the original design? Precalculating the tables makes sense, but there's an easy way around that: Take a page for each instance, and then rewrite the contents as needed. I don't think you can use the optimization anyway, if you want to proxy the VOP's across a network or the user/kernel boundary for user space FS work, but other than that, it's a ggood instance-time optimization (e.g. leave it there, and instance it with the double dereference for the proxy cases). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message