Subject: is VNODEPAGER optional ?
To: None <tech-kern@NetBSD.ORG>
From: Erik Bertelsen <erik@sockdev.uni-c.dk>
List: tech-kern
Date: 09/11/1996 17:34:26
In an attempt to minimize the size of the NetBSD kernel, I tried
to remove the option VNODEPAGE from the kernel configuration file.

This failed miserably as documented by the output below.

It seems that VNODEPAGER is tested in just one kernel source file,
i.e. vm/vm_pager.c, but several other files contain reference to
the vnode related functions.

Question is vnode paging necessary for any NetBSD kernel?

If no, all references to the vnode_pager_xxx functions should be guarded
by #ifdef VNODEPAGER. If VNODEPAGER is intended to be optional, I'll be
happy to submit a PR to document the fact that this is not currently
the case.

If yes, the test for VNODEPAGER should be removed in vm/vm_pager.c, and
the option VNODEPAGER should be removed by all kernel configuration files.

Any comments ?

Erik Bertelsen.

=============================================================
ld -N -Ttext 80030000 -e start -x -o netbsd ${SYSTEM_OBJ} vers.o
vfs_subr.o: In function `vfs_shutdown':
../../../../kern/vfs_subr.c(.text+0x2664): undefined reference to
`vnode_pager_umount'
vfs_syscalls.o: In function `dounmount':
../../../../kern/vfs_syscalls.c(.text+0x910): undefined reference to
`vnode_pager_umount'
vfs_syscalls.o: In function `sys_unlink':
../../../../kern/vfs_syscalls.c(.text+0x2264): undefined reference to
`vnode_pager_uncache'
vfs_vnops.o: In function `vn_writechk':
../../../../kern/vfs_vnops.c(.text+0x590): undefined reference to
`vnode_pager_uncache'
nfs_bio.o: In function `nfs_write':
../../../../nfs/nfs_bio.c(.text+0xfd8): undefined reference to
`vnode_pager_uncache'
../../../../nfs/nfs_bio.c(.text+0x128c): undefined reference to
`vnode_pager_setsize'
nfs_subs.o: In function `nfs_loadattrcache':
../../../../nfs/nfs_subs.c(.text+0x2690): undefined reference to
`vnode_pager_setsize'
nfs_subs.o: In function `nfs_getattrcache':
../../../../nfs/nfs_subs.c(.text+0x2938): undefined reference to
`vnode_pager_setsize'
nfs_vnops.o: In function `nfs_open':
../../../../nfs/nfs_vnops.c(.text+0x824): undefined reference to
`vnode_pager_uncache'
../../../../nfs/nfs_vnops.c(.text+0x87c): undefined reference to
`vnode_pager_uncache'
../../../../nfs/nfs_vnops.c(.text+0x9b4): undefined reference to
`vnode_pager_uncache'
nfs_vnops.o: In function `nfs_setattr':
../../../../nfs/nfs_vnops.c(.text+0x11d4): undefined reference to
`vnode_pager_setsize'
../../../../nfs/nfs_vnops.c(.text+0x1290): undefined reference to
`vnode_pager_setsize'
ffs_alloc.o: In function `ffs_realloccg':
../../../../ufs/ffs/ffs_alloc.c(.text+0x4d4): undefined reference to
`vnode_pager_uncache'
ffs_balloc.o: In function `ffs_balloc':
../../../../ufs/ffs/ffs_balloc.c(.text+0x1b8): undefined reference to
`vnode_pager_setsize'
ffs_inode.o: In function `ffs_truncate':
../../../../ufs/ffs/ffs_inode.c(.text+0x468): undefined reference to
`vnode_pager_setsize'
../../../../ufs/ffs/ffs_inode.c(.text+0x59c): undefined reference to
`vnode_pager_uncache'
../../../../ufs/ffs/ffs_inode.c(.text+0x75c): undefined reference to
`vnode_pager_uncache'
ffs_vnops.o: In function `ffs_write':
../../../../ufs/ufs/ufs_readwrite.c(.text+0x770): undefined reference to
`vnode_pager_setsize'
../../../../ufs/ufs/ufs_readwrite.c(.text+0x778): undefined reference to
`vnode_pager_uncache'
ufs_vnops.o: In function `ufs_chmod':
../../../../ufs/ufs/ufs_vnops.c(.text+0x984): undefined reference to
`vnode_pager_uncache'