Subject: Re: block sizes
To: None <>
From: Christoph Badura <>
List: tech-kern
Date: 05/18/1999 16:13:58 (Ignatios Souvatzis) writes:
>- why do we have N copies of bounds_check_with_label()?

Note these are N copies of bounds_check_with_label() all slightly different.
Probably for hysterical raisins.  And this should probably be factored out
into an MI file.

>- whats the supposed meaning of

>* DEV_BSIZE,DEV_BSHIFT	( 512,9 bytes/bits on all)

That's the devices logical "sector" size.

>* BLKDEV_IOSIZE		(2048 bytes on all but pc532, where it is 4096 bytes)

That's the size for IO requests to block devices.  It limits the size of IO
requests to block devices in spec_{read,write}().  As CGD pointed out on ICB
having this smaller then the page (cluster) size just wastes memory in the
buffer cache.  I guess you want to increase that to at least NBPG.

>(both set in machine/param.h)
>and why do we set them in machine/param.h?
>(I suspect these should be either constant, or variable and per-device!)

BLKDEV_IOSIZE should maybe a per machine constant.  Certainly not a per-device
Christoph Badura

	Anything that can be done in O(N) can be done in O(N^2).
	-- Ralf Schuettau (after looking at a particular piece of code)