Re: NAND flash misery





Stefan Reuther wrote:

Vladimir Vassilevsky wrote:

"David Brown" <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message

The actual erase block size in NAND flash is something like 32/64/128/256KB,
being bigger for the higher capacity devices. What it implies: any write
operation through the IDE interface is actually read - copy - erase -
modify - write at the controller level.

Not if the implementor of the controller firmware did his homework.

This is what described in the appnotes from Samsung and Sandisk.

If
that's the case, a 512-byte block write ends up as a 512-byte block
write at the flash device, at a new address, and the old address is just
marked as unusable. No read/erase/modify/write for every operation.
Garbage compaction happens a some time in the background.

So something like FAT or MFT has to be maintained internally, and it has to be done in the background instead of by every transaction. This scheme doesn't seem to be very applicable for the removable media.

Since this kitchen is hidden behind IDE, there is no point in
using YAFS or JFS or such.

Exactly. Although I heard some controller firmware used in consumer
flash disks optimizes based on the assumption that the file system at
the other end of the IDE or USB interface is FAT.


A disk cache with the blocks of 32k makes a lot of sense though.
Not more or less for a flash disk than any other disk.

There is a very significant penalty in the speed of the flash write operation at the IDE level if the short blocks are used. The difference can be as high as 10 times or so. According to the appnotes, this happens due to the read - modify - write thing.



Stefan

VLV

.



Relevant Pages

  • [TRIVIAL] kill surplus menu in IDE Kconfig
    ... +comment "Please see Documentation/ide.txt for help/info on IDE drives" ... +config BLK_DEV_HD_ONLY ... This will include enhanced support for MFM/RLL/IDE hard disks. ... bool "Amiga Gayle IDE interface support" ...
    (Linux-Kernel)
  • Re: Grub boot problem
    ... > calls it hdc3. ... on the other system the hard drive is on the secondary IDE controller. ... the primary IDE interface, hdc = Master device on the secondary IDE ... interface, hdd = Slave device on the secondary IDE interface, hde = Master ...
    (linux.redhat.misc)
  • [PATCH] Use on-board instead of built-in in config options
    ... + tristate "Builtin PowerMac IDE support" ... tristate "National SCx200 chipset support" ... This is the IDE driver for the Amiga Gayle IDE interface. ...
    (Linux-Kernel)
  • [git patches] IDE fixes
    ... ide: ... config BLK_DEV_CMD640 ... bool "Amiga Gayle IDE interface support" ...
    (Linux-Kernel)
  • PATCH: CMD640 IDE chipset
    ... > BTW Andre is no longer maintaing IDE, cc: ... I was using it succesfully in the 2.2.x kernel series, ... called once for each ide interface found, so the old way of addressing ...
    (Linux-Kernel)