[6243] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: how to get maximum datarate from SCSI

daemon@ATHENA.MIT.EDU (Stephen C. Tweedie)
Thu Apr 1 13:46:42 1999

From: "Stephen C. Tweedie" <sct@redhat.com>
Date: 	Thu, 1 Apr 1999 15:37:11 +0100 (BST)
To: "Mateu Batle i Sastre" <mbatle@iname.com>
Cc: <linux-scsi@vger.rutgers.edu>, Stephen Tweedie <sct@redhat.com>
In-Reply-To: <000401be752b$90d75ff0$2900a8c0@pc1.preview.es>

Hi,

On Tue, 23 Mar 1999 13:49:18 +0100, "Mateu Batle i Sastre"
<mbatle@iname.com> said:

> I'm trying to get the maximum transfer datarate from several SCSI disks 
> from a user application. I think the problem now is that all the transfers
> go through the buffer cache, which implies a lot of memory copy and this
> bounds the maximum I/O. It should be possible to access the SCSI disks
> bypassing the buffer cache of the block devices. 
> Is there any easy way to do this ?

Yes, at least for 2.2.  I have proper Unix-style character raw devices
working now, and although the code is still under test, you are welcome
to try it out.  ftp.uk.linux.org:/pub/linux/sct/fs/raw*.

> My first option would be to use some special flag when openning the file
> to avoid going through the buffer cache. But I have not found anything 
> similar.

That's a standard API in SGI: O_DIRECT provides it and the plan is to
offer that for Linux too eventually.  The current raw patches only offer
raw character devices, not O_DIRECT, but they do let you use _any_ block
device as a raw, unbuffered device: you imply bind the raw front-end
devices to whichever block devices you want to use.  This is in contrast
with the normal Unix way of doing things, which preallocates major/minor
character numbers for specific raw devices: that falls over if you start
adding new block devices which don't have raw equivalents.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post