headsup: swap_pager.c

Robert Watson rwatson at freebsd.org
Sat Aug 2 07:57:40 PDT 2003


On Sat, 2 Aug 2003, Poul-Henning Kamp wrote:

> In message <20030802100150.H39348-100000 at hewey.af.speednet.com.au>, Andy Farkas
>  writes:
> 
> >I wasn't going to say anything (you can delete now) but the more I think
> >about it, the more I think "if it aint broke, dont fix it".
> 
> It is broken, it contains a bogo-vnode and it wastes RAM (it may be
> cheap but you shouldn't use 4 times the necessary RAM). 

For me, the biggest benefit of this change is the removal of the
bogo-vnode; I'd just like to make sure we don't see an observable
performance hit in interesting cases.

To clarify the notion of bogo-vnodes, for those less familiar with it,
there are a few vnodes that are randomly pulled out of hats for some
arbitrary things.  They break some of the normal working assumptions of
vnodes -- for example, almost every vnode in the system has a non-NULL
v_mount pointer, and is associated with a mountpoint.  The vnodes I know
of that don't meet this property are the swap striping vnode, and the
vnodes "pulled out of a hat" to refer to devices when you don't yet have
access to the device file system.  This occurs in bdevvp(), which converts
a dev_t into a dummy vnode pointing at the device.  Under normal
circumstances, non-dead vnodes always have a file system they are
associated with.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Network Associates Laboratories




More information about the freebsd-arch mailing list