Subject: Re: tsleep
To: None <tech-kern@netbsd.org>
From: Mirian Crzig Lennox <lennox@alcita.com>
List: tech-kern
Date: 07/06/1999 14:31:15
Jason Thorpe <thorpej@nas.nasa.gov> writes:
>
> Um... It's NOT "two distinct symbol tables".
In most cases, it really is. For example, in /sys/kern/vfs_subr.c we
have
In vinvalbuf():
tsleep((caddr_t)bp, slpflag | (PRIBIO + 1), "vinvalbuf",lptimeo);
In vflushbuf():
tsleep((caddr_t)&vp->v_numoutput, PRIBIO + 1, "vflushbuf", 0);
In vget():
tsleep((caddr_t)vp, PINOD, "vget", 0);
In vgone():
tsleep((caddr_t)vp, PINOD, "vgone", 0);
In effect, we're duplicating information that already exists in the
kernel symbol table.
If tsleep() were changed such that the calls could be:
tsleep((caddr_t)bp, slpflag | (PRIBIO + 1), (caddr_t)vinvalbuf,lptimeo);
etc.,
Then we'd get back 27 bytes "for free". Maybe not a lot, but why
waste any space if you don't need to? And in the aggregate, it could
easily be a few K of kernel mem.
--
Mirian Crzig Lennox Systems Anarchist
"Don't follow leaders... watch the parking meters." --Bob Dylan