[8178] in linux-scsi channel archive
Re: scatter gather or not to scatter gather
daemon@ATHENA.MIT.EDU (Douglas Gilbert)
Wed Feb 23 08:42:45 2000
Message-ID: <38B3E1A8.F6F6CC36@interlog.com>
Date: Wed, 23 Feb 2000 08:33:28 -0500
From: Douglas Gilbert <dgilbert@interlog.com>
MIME-Version: 1.0
To: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
Cc: The Linux SCSI list <linux-scsi@vger.rutgers.edu>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Matthew Dharm wrote:
>
> Well, I spoke too soon, apparently.
>
> After doing some tests with SG_NONE, I discovered that instead of issuing
> one large transfer, the SCSI layers above me issue lots of little (1K)
> transfers. Effectively, the scatter-gather behavior is being emulated,
> but with much more overhead involved.
>
> Is there any way to tell the higher scsi layers "I would like big
> transfers, with larger chunks of memory"? The memory seems available...
> often two or three successive transfers come in with adjacent memory
> buffers.
Matt,
I'm not aware of a way for a HBA to tell the higher layers anything
about desired chunk sizes. In the case of sg, the users of sg (SANE,
cdparanoia, etc) like to control that parameter ... Then there are
restrictions of the kernel and the HBA (e.g. ISA) which make this area
reasonably complicated.
BTW Sg uses a 32KB chunk size so to support a transfer size of 128KB
that SANE and cdparanoia like requires the HBA to support a scatter
gather list of at least 4 elements. Will USB scanners be using your
driver? If so, that is one reason to support scatter gather.
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu