[8176] in linux-scsi channel archive
Re: scatter gather or not to scatter gather
daemon@ATHENA.MIT.EDU (Alan Cox)
Wed Feb 23 08:07:24 2000
To: mdharm-scsi@one-eyed-alien.net (Matthew Dharm)
Date: Wed, 23 Feb 2000 11:56:24 +0000 (GMT)
Cc: linux-scsi@vger.rutgers.edu (The Linux SCSI list)
In-Reply-To: <Pine.LNX.4.10.10002221759010.6488-100000@ziggy.one-eyed-alien.net> from "Matthew Dharm" at Feb 22, 2000 06:04:53 PM
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <E12NaP4-0003gD-00@the-village.bc.nu>
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
> gather, or I can opt not to. If I don't use scatter gather, there will be
> an (as yet) unquantified performance gain on the USB bus that this virtual
> host uses. However, what are the negatives in terms of the SCSI
> layering?
Its a straight performance trade of between more work in your code and more
work in the scsi layer. Supporting scatter-gather means large commands from
scsi-tape and scsi-generic will behave better.
> >From my logs, it seems that the SCSI layer is sending me long
> scatter-gather chains, where each block is 1K in size, and they tend to be
> all or mostly adjacent in RAM.
Turn on clustering as well, then you should see a stream of page sized blocks
typically. Also with the normal 4K file system folks use now. (And with CD
you'll see 2K blocks clustering into pages)
> The question boils down to this: Why would it be bad for me to replace the
> SG_ALL in the host template with SG_NONE?
scsi generic large requests stop working
many more scsi command issue/completion cycles occur
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu