Re: Flashdisks and linux

From: David Woodhouse (dwmw2@infradead.org)
Date: Fri Mar 31 2000 - 05:30:16 EST


walter.zimmer@esk.fhg.de said:
> We are working with flash disks and I want to check the current
> ongoing development status of flashdisk drivers.

See http://www.linux-mtd.infradead.org/

> Flashdisks can be divided into two groups:
> - Flash memory [cards]
> - IDE Flash disks

> The first need a proprietary driver which accesses the memory and
> does some optimization for reading/writing. So the brains would best
> be put into the device driver itself.

In fact, we've come to the conclusion that a two-layer approach is more
suitable. We have hardware drivers which give raw read/write/erase
functionality directly on the flash, and higher-level 'users' which do the
appropriate wear-levelling and translation into something more usable. These
higher-level drivers currently include FTL, NFTL, JFFS, FFS2 and a direct
block device (more suitable for RAM than flash, obviously).

> The second ones are accessed like normal IDE devices, but still have
> the limitations of flash disks on regard to a limited number of write
> accesses. Therefore, the brain here would go into the file system.

> Now, to the questions: are there any well known algorithms which
> maximize the life of a flash disk?

If you must use CompactFlash you don't have a lot of choice - it emulates a
block device and you have to put a normal filesystem on that because you can't
talk to the flash directly - but you could at least mount your filesystems with
-onoatime so that you don't write to the flash every time you read a file.

Most CompactFlash devices probably¹ use FTL or something very similar
internally, which is a kind of journalling filesystem which emulates a block
device. You're probably going to want to use a JFS of some kind on top of this
emulated block device, so you'll end up with two layers of journalling, which
isn't likely to be a particularly efficient use of the hardware.

If you're using flash directly, you'd probably do best to use JFFS, which
doesn't pretend to be a block device, and was designed specifically for use on
flash. See http://developer.axis.com/software/jffs/ for more information.

¹WAG

--
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:29 EST