Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2007 15:26:19 +0000
From:      Bruce M Simpson <bms@incunabulum.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, "Bruce M. Simpson" <bms@FreeBSD.org>, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/atacontrol atacontrol.c
Message-ID:  <4766951B.8090504@incunabulum.net>
In-Reply-To: <11419.1197903331@critter.freebsd.dk>
References:  <11419.1197903331@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
>> Aha, I understand now. CFA and SATA vendors have gone off in two 
>> separate directions:
>> * PATA and SATA drives, for a few years now, have tended to rewrite one 
>> cylinder at a time, which implies erasing the data on that cylinder.
>>     
>
> Everybody denies this in the stongest possibly way whenever I ask them,
> so far I have not seen this claim substantiated by any fact or person
> who would be in a position to know.
>   

Is this a case of blanket denial on the part of the disk manufacturers?

The feedback I've seen in FreeBSD forums regarding ATA write caching 
tends to back up your original assertion.

I wonder if vendor neutral, reproducible, scientific research has been 
conducted into this issue.

>   
>> * NAND Flash devices should not have their sectors erased unless 
>> absolutely necessary, to implement wear levelling.
>>     
>
> Wrong, almost exactly the opposite in fact:
>
> Flash devices using wear-levelling should have data erased as soon as
> possible to give the wear-levelling the maximum amount of information
> and available space to work with.
>   

Ah, let me rephrase, I meant:

* NAND Flash embedded ATA controllers should not erase sectors 
containing data unless absolutely necessary, to implement wear levelling.
 * BIO_DELETE provides the necessary hint from the OS, by way of the ATA 
CFA ERASE command, to tell the flash controller that the upper layer 
consumer of the blocks has marked the data as being erased.
 * The NAND flash ATA controller is *then* in a position to know how 
best to implement that wear levelling as the OS has told it "I'm not 
using these sectors any more".

Is this a correct summary?

[I came across an alternative to JFFS2 awhile back whose name escapes 
me, which might work for the SDIO arm stuff imp was playing with.]

BMS



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