1

For a linux kernel with virtual memory and disk storage, pages are swapped back and forth into swap area. But embedded systems generally use NAND flash instead of disk. A NAND flash has a limited number of writes allowed, as guaranteed by its manufacturer (although the limit is high in most cases).

How the wear out in this page swapping case is handled in kernel ? Or the Linux based embedded systems generally turn off the virtual memory page swap to avoid NAND flash wear and tear ?

1
  • how to avoid wearing out flash is to not use it. only use it where needed. Some flash memories try to handle the wear leveling for you, when you go and try to handle the wear leveling yourself you will probably fail and make it worse not better. Newer technologies have read disturb problems and other problems, use the flash as little as possible.
    – dwelch
    Mar 28, 2012 at 14:21

2 Answers 2

3

Embedded systems running on flash don't use swap. Please don't confuse that with virtual memory though - virtual memory has many more usages then just swapping to disk.

2

Linux doesn't use swap space arbitrarily. You (or your distribution install wizard) must first create a swap partition (mkswap) and activate it (swapon). So avoiding wearing out a NAND flash disk is as simple as never putting a swap partition on that disk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .