Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2002 23:23:55 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Matthew Dillon <dillon@apollo.backplane.com>, ak03@gte.com, freebsd-current@FreeBSD.ORG, jroberson@chesapeake.net, arr@FreeBSD.ORG, obrien@FreeBSD.ORG
Subject:   Re: Found: module loading breakage
Message-ID:  <3C9C2D8B.6B1042A2@mindspring.com>
References:  <F182Mb1s7nlT2NqFJ3s0000d89b@hotmail.com> <20020323054757.GQ10521@elvis.mu.org> <200203230601.g2N61Km66589@apollo.backplane.com> <3C9C2AFE.376A261A@mindspring.com> <20020323071544.GR10521@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:
> * Terry Lambert <tlambert2@mindspring.com> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C9C2D8B.6B1042A2>