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 ?

migrated from stackoverflow.com Apr 1 '12 at 4:02

This question came from our site for professional and enthusiast programmers.

  • 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 '12 at 14:21
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.