difference between VM_IO and VM_RESERVED

What is the difference between the vma_flags VM_IO and VM_RESERVED? How should they be used? The comments in linux kernel source code is very confusing

http://lxr.free-electrons.com/source/include/linux/mm.h?v=3.4;a=arm#L104 http://lxr.free-electrons.com/source/include/linux/mm.h?v=3.4;a=arm#L96

#define VM_IO           0x00004000      /* Memory mapped I/O or similar */
#define VM_RESERVED     0x00080000      /* Count as reserved_vm like IO */

Thanks

Answers


From: http://www.makelinux.net/ldd3/chp-15-sect-1

"VM_IO marks a VMA as being a memory-mapped I/O region. Among other things, the VM_IO flag prevents the region from being included in process core dumps. VM_RESERVED tells the memory management system not to attempt to swap out this VMA; it should be set in most device mappings."

For better understanding of how and why these evolved and what is the linux kernel community's recommendation, read these lwn articles:

http://lwn.net/Articles/161204/ http://lwn.net/Articles/162860/


UPDATE: The VM_RESERVED flag has been discontinued. See Linus' patch


Need Your Help

Parsing an HTML table to a list in python

python html web-scraping html-table elementtree

So I have a few strings that I am pulling from IMDb's award pages:

Amazon SQS: The same message is consumed by two current consumers

java amazon-web-services jms message-queue amazon-sqs

I have four current consumers listening to the same queue on Amazon AWS. When pulling message down from the queue, it appears sometimes the same message is consumed by two different consumers. Plea...