A problem with kernel buffers (struct buf).

Brian Thomson thomson at uthub.UUCP
Thu Aug 29 11:59:17 AEST 1985


The file /sys/h/param.h defines the parameter MAXBSIZE, with
the comment

    MAXBSIZE primarily determines the size of buffers in the buffer
    pool.

Your system, like most, probably has MAXBSIZE set to 8192.
Although geteblk(n) doesn't check to see if you've exceeded that
limit, it is an error to do so.

This happens because the system allocates MAXBSIZE bytes of system
virtual space per buffer at startup, then slaps in as many real pages
per buffer as you need when you need them.  By asking for a 10k buffer,
you slop over into the virtual space reserved for the next buffer,
and those extra pages may be freed when that next buffer shrinks.
The symptom would be a protection trap panic accessing an address
more than 8k from the start of the buffer (bp->b_un.b_addr).
-- 
		    Brian Thomson,	    CSRI Univ. of Toronto
		    {linus,ihnp4,uw-beaver,floyd,utzoo}!utcsrgv!uthub!thomson



More information about the Comp.unix.wizards mailing list