Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 ?

share|improve this question

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
    
This question is a linux configuration question and belongs on unix.se –  Ben Voigt Mar 28 '12 at 14:27

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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