Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Dec 1999 09:29:22 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Jonathon McKitrick <jcm@dogma.freebsd-uk.eu.org>, Ian Struble <ian@broken.net>, Ruslan Ermilov <ru@ucb.crimea.ua>
Cc:        freebsd-questions@FreeBSD.ORG, Alejandro Ramirez <ales@megared.net.mx>
Subject:   Re: LBA speed enhancements
Message-ID:  <19991217092921.I46720@freebie.lemis.com>
In-Reply-To: <Pine.BSF.4.21.9912161648580.1526-100000@dogma.freebsd-uk.eu.org>
References:  <Pine.BSF.4.21.9912161648580.1526-100000@dogma.freebsd-uk.eu.org> <19991216195321.A12391@relay.ucb.crimea.ua> <Pine.BSF.4.21.9912161711250.1526-100000@dogma.freebsd-uk.eu.org> <Pine.BSF.3.91.991216092310.23637K-100000@disavowed.broken.net> <Pine.BSF.4.21.9912161648580.1526-100000@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991217092921.I46720>