Skip to contentSkip to conversation

Under what conditions are VMAs merged?

DISCUSSION H. Peter Anvin 2 participants 2 messages Oct 18, 2001 Memory management

lore
Share & tools
lore
#0 lore raw

Okay, as part of doing this persistent memory system, I apparently need to know better when and if VMAs are merged. The persistent memory obviously does lots of mprotect() to what is otherwise a large private mapping of a file (not anonymous.)

In the checkpoint routine I thought doing an mprotect(PROT_READ) on the entire region as a single system call would coalesce the VMAs, but apparently that is not the case; after running my standard stress-test application, /proc/pid/maps show 51635 mappings, most of them contiguous and otherwise matching the surrounding mappings in every way; a dump of /proc/pid/maps is at ftp://terminus.zytor.com/pub/hpa/map.gz for the morbidly curious.

This system is running a stock 2.4.12-ac1; the database file is 1 GB+overhead in size (1,074,008,064 bytes to be exact), it is mapped at 0x5f000000.

Appreciative for any suggestions.

-hpa

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/

#1 lore raw
Quoted 5 lines · H. Peter Anvin

In the checkpoint routine I thought doing an mprotect(PROT_READ) on the entire region as a single system call would coalesce the VMAs, but apparently that is not the case; after running my standard stress-test application, /proc/pid/maps show 51635 mappings, most of them contiguous and otherwise matching the surrounding mappings in every way; a dump of

Only anonymous vmas are candidates for merging. Take it up with the head penguin. No merging at all is done for shared vmas.

-ben
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/