Technologic Systems XNAND technology is a user-space device driver that uses a simple RAID algorithm, Reed-Solomon codes, and extra checksums to allow any Linux filesystem to be used with confidence on NAND flash. The result is a rugged non-volatile storage device with industrial grade flash reliability. Our TS-BOOTROM also boots from XNAND for an ultra-reliable bootup.
Many embedded systems require a non-volatile storage media that is rugged, affordable, big enough for a Linux file system, and extremely reliable. The only technology that meets the first three criteria is NAND flash. Spinning hard drives and removable media such as SD cards or USB thumb drives do not always meet our requirements for durability in harsh environments. The best solution is flash storage that is soldered directly onto the board. NOR flash is reliable, but it is 10-20 times more expensive than NAND flash. So, NAND flash soldered to the board is the preferred hardware option.
NAND flash, unlike NOR flash, is prone to bad blocks. A 512MB NAND flash chip often has bad blocks on it when shipped from the factory. More blocks will become unreliable over time. The traditional way of dealing with bad blocks is with a flash-specific filesystem such as YAFFS2 or JFFS2. While flash file systems often perform well in embedded systems, and we will continue to support them on our products that currently use them, we feel they have room for improvement. Here are some concerns we have about flash file systems:
- Flash file systems are tightly coupled to the Linux kernel. This can create extra risk and expense for applications that require a kernel version upgrade.
- Flash file systems that are not cleanly unmounted can take an unacceptably long time to mount.
- Flash file systems with a lot of files can have a large memory footprint.
- Flash file systems are not as robust as we would like in how they handle unexpected power losses or unclean shutdowns.
No file system is perfect. What we wanted was a way to run our preferred file systems such as ext3 and jfs on NAND flash, with absolute confidence in the underlying hardware. The solution is a software layer that presents NAND flash as a block device so that any file system can be created on it.
Our engineers at Technologic Systems realized that bad flash blocks would not be a problem if enough redundancy was built into the system. Unlike other flash controllers and flash file systems, XNAND does not use fancy algorithms to work around bad blocks. With XNAND, if a block is marked bad, it is just not used, and this works smoothly because the data that would be on that block is stored in two other places anyway.
How It Works
With TS XNAND, all data blocks are written in three places on the underlying flash using a type of RAID. Each copy is on a separate NAND eraseblock, so if an entire eraseblock of flash is not functional, two copies of the data are still available. Each underlying flash sector also has a Reed-Solomon ECC syndrome as well as an extra checksum in its out of band data. When an XNAND sector is read, it passes both of those tests. On extremely rare occasions, it fails, in which case the second and third copy are available, both of which are also protected by Reed-Solomon and checksum. In order for an XNAND read to fail, there would have to be three failures, each of which is so bad that it cannot be corrected by the Reed-Solomon code, each of which is on a different eraseblock. Further, all three of these failures would have to fall into a set of eight eraseblocks which are systematically scattered around the NAND chip.
The XNAND driver also addresses the concern that NAND flash data will become corrupted over time or over thousands of read cycles. Blocks are periodically checked for data integrity and refreshed if necessary.
The XNAND driver is implemented entirely in user space. Like our latest SD card drivers, the code runs in user space and uses the Linux NBD system to provide a block device. These user space utilities are easier to write and debug than kernel drivers, and they provide kernel independence. This is a substantial benefit to customers who want to upgrade the kernel version on their TS board without losing driver support.
Pros and Cons of XNAND
Technologic Systems is introducing XNAND on the TS-7550, TS-7552, TS-7553 and TS-4500. We expect to use it on more new products in 2010. Please contact us if you are interested in using XNAND on the TS-7800, TS-7390, or TS-7395, or if you have any questions about XNAND.
|Date of Issue/Revision||Revision Number||Comments|
|02/24/2010||1.1||Revised platform support|