Subject: Re: Single file system (buf) read size
To: =?iso-8859-1?Q?P=E5l_Halvorsen?= <>
From: Manuel Bouyer <>
List: tech-kern
Date: 03/15/2001 10:24:19
On Thu, Mar 15, 2001 at 10:07:51AM +0100, Pål Halvorsen wrote:
> OK, I might have a problem getting read sizes larger than 64 KB, but
> in my system (having created a zero-copy data path for streams), I
> allocate my own buf structures with my own memory region. I do not use the
> buffer cache - but an separate buffer manager carrying out the file system
> functions. I "only" use 
> 	VOP_BMAP(vp, bp->b_lblkno, NULL, &bp->b_blkno, &num_ra);
> to see the amount of data to read ahead and
> to call the disk driver (SCSI) with my buf structure. 
> In such a case, is it possible, without too much work - especially in the
> driver code which I do not know much about, to get > 64 KB read
> operations?

It depends on the driver :)
For IDE disks for example, it's hardware - an IDE disk can't do more than
64K (in fact I think it can do 127.5K - but not 128K it would overflow the
nsect register). For SCSI there may be limitations in some hardware,
at the adapter level (or underlying bus level - I think on pmax you can't
DMA more than 8k for example, but my memory may be failing :).
So it really depends on the hardware. For example in siop it's just a matter
of bumping a constant, and adding more slots in the script (it's even
ready for 128K on hardware with 8k pages I think :).
Other drivers may adapt automatically to MAXPHYS ...

Manuel Bouyer, LIP6, Universite Paris VI.