From owner-freebsd-current Fri Apr 30 22:55:32 1999 Delivered-To: freebsd-current@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id B0A9F14FD7 for ; Fri, 30 Apr 1999 22:55:27 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id PAA23833; Sat, 1 May 1999 15:25:25 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id PAA94582; Sat, 1 May 1999 15:25:24 +0930 (CST) Date: Sat, 1 May 1999 15:25:23 +0930 From: Greg Lehey To: Matthew Jacob Cc: Brad Knowles , FreeBSD current users Subject: Linux char devices (was: Porting Greg Lehey's rawio.c from FreeBSD to Linux...) Message-ID: <19990501152523.H80561@freebie.lemis.com> References: <19990501134333.G80561@freebie.lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Matt Jacob on Fri, Apr 30, 1999 at 09:25:12PM -0700 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 30 April 1999 at 21:25:12 -0700, Matt Jacob wrote: > >> On Friday, 30 April 1999 at 20:51:06 -0700, Matt Jacob wrote: >>>> >>>> I don't really understand why you ask a FreeBSD group about it; it's a >>>> Linux issue. FWIW, about the only area where you're liable to run >>>> into difficulties is in the disk label handling round line 300, which >>>> is pretty peripheral to the function: it's just there as one way of >>>> finding out the size of the partition. You'll need in-depth Linux >>>> information to even find out if Linux has an equivalent function. >>> >>> Open the device, and >>> >>> if (ioctl(fd, BLKGETSIZE, (caddr_t) &seeklim) < 0) { >>> >>> see >> >> Thanks for the info. Looking at this, it looks as if this ioctl is >> for a block device. rawio uses character devices. Does that make a >> difference? > > > > There are no raw devices in Linux. Linus is totally against them as > stupid. Linus has some good points about this, but it's still an, um, > interesting stance. It also makes it impossible for rawio to run accurately. rawio measures device throughput, not system throughput. Cache the data and you completely lose this ability (hey! Under Vinum, an array of four floppies has a random read throughput of 50 MB/s!). Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message