From owner-freebsd-questions Thu Dec 16 15: 1: 7 1999 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by hub.freebsd.org (Postfix) with ESMTP id 92E621529B for ; Thu, 16 Dec 1999 15:01:01 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id JAA56894; Fri, 17 Dec 1999 09:29:22 +1030 (CST) Date: Fri, 17 Dec 1999 09:29:22 +1030 From: Greg Lehey To: Jonathon McKitrick , Ian Struble , Ruslan Ermilov Cc: freebsd-questions@FreeBSD.ORG, Alejandro Ramirez Subject: Re: LBA speed enhancements Message-ID: <19991217092921.I46720@freebie.lemis.com> References: <19991216195321.A12391@relay.ucb.crimea.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: 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-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thursday, 16 December 1999 at 16:49:45 +0000, Jonathon McKitrick wrote: > > In the LINT file, there are HD flags for LBA. Is this a performance > issue, or just to allow reading large drives? On Thursday, 16 December 1999 at 19:53:21 +0200, Ruslan Ermilov wrote: > On Thu, Dec 16, 1999 at 04:49:45PM +0000, Jonathon McKitrick wrote: >> >> In the LINT file, there are HD flags for LBA. Is this a performance >> issue, or just to allow reading large drives? > > This flag is to turn on logical block addressing mode on your drive. > For example, one of my IDE drives becomes different with and without > LBA. In CHS mode, BIOS reports 3298*16*63=3324384 geometry, and > FreeBSD detects 3324384 sectors total. In LBA mode, BIOS reports > 824*64*63=3322368 geometry, but FreeBSD detects 3324996 sectors!!! > As you can see, using LBA mode gives me 612 "additional" sectors. > Note, that you could turn on LBA mode only for "unformatted" drives, > without existing filesystems. Changing the drive's current mode will > certainly mess it up. The specific difference between LBA and CHS (Cylinder/Head/Sector) is the way you address the data on the drive. In the olden days, you told the drive just what to do: position to this cylinder, select this head, and read this sector. The driver was responsible for any conversions necessary. Modern drives no longer have a fixed number of sectors per track, so the conversion calculations would become impossibly difficult. As a result, all modern drives fake the number of cylinders, heads and sectors. Internally they just use the number of the block, starting at the outside of the disk. This is what we call LBA, and all modern disk hardware supports it. As Ruslan observes, there can be roundoff errors when calculating CHS counts (who ever heard of 0.57 of a track?). There's not a significant difference in performance between LBA and CHS, but it obviously makes more sense to use LBA. In addition, there are some limitations with CHS which makes it inoperable after (I think) 32 GB. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message