Date: Thu, 6 Jul 2000 14:47:06 -0600 From: "Kenneth D. Merry" <ken@kdm.org> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Max DMA size Message-ID: <20000706144706.A25372@panzer.kdm.org> In-Reply-To: <Pine.SOL.4.21.0007061545020.7314-100000@sol.cs.binghamton.edu>; from zzhang@cs.binghamton.edu on Thu, Jul 06, 2000 at 03:51:34PM -0400 References: <Pine.SOL.4.21.0007061545020.7314-100000@sol.cs.binghamton.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 06, 2000 at 15:51:34 -0400, Zhihui Zhang wrote: > > Can anyone tell me what factors determine the max DMA size (DMA counter on > each controller or PCI bus related)? What is the typical max DMA size for > a SCSI disk connected to a PCI bus? It seems to be much larger than > MAXPHYS (128K). If so, does it mean we are not using full potential of > DMA? So what's the problem if we enlarge MAXPHYS? > > Any help is appreciated. MAXPHYS determines the size of struct buf, which at the moment determines the maximum size of a given DMA transaction to a SCSI controller. Typical modern SCSI controllers can handle much more than MAXPHYS data (currently 128K) at a time. An exception is the Adaptec 154x controllers, which can only handle about 64K of data. (Thus the reason I/O through the CAM passthrough interface is limited to 64K instead of the full 128K. We will have that limitation until we implement a way of determining the maximum DMA size allowable for a given controller.) However, as Matt said, you have to be careful about increasing MAXPHYS too much, since you could end up allocating too much memory. I think a better approach to increasing the amount of data that can be sent at one time to a SCSI controller would be to implement some sort of buffer chaining scheme. Most SCSI controllers can do scatter/gather DMA, and CAM has facilities for it, so that would probably be the easiest way to go. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000706144706.A25372>