Skip to contentSkip to conversation

Discardable mappings?

DISCUSSION H. Peter Anvin 2 participants 2 messages Oct 15, 2001 – Oct 16, 2001 Memory management

lore
Share & tools
lore
#0 lore raw

I have been working on a user-space persistent memory system, and would like to bring up (again?) the possibility of a "discardable" class of mappings. "Discardable" means that the system is free to throw away a page without storing it to swap, and return SIGSEGV on access, since the application can regenerate the data on that page if needed.

My personal preference would be if this was a PROT_* flag that could be used with mprotect(), since my system, and probably most other systems which need this kind of functionality, use mprotect() on these pages already, and it'd be nice to avoid Yet Another System Call[TM] in a very performance-critical part of the system; furthermore, I tend to think of mprotect() as controlling when to raise SIGSEGV, so it's not *completely* out of place there...

-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 6 lines · H. Peter Anvin

I have been working on a user-space persistent memory system, and would like to bring up (again?) the possibility of a "discardable" class of mappings. "Discardable" means that the system is free to throw away a page without storing it to swap, and return SIGSEGV on access, since the application can regenerate the data on that page if needed.

Quoted 7 lines

My personal preference would be if this was a PROT_* flag that could be used with mprotect(), since my system, and probably most other systems which need this kind of functionality, use mprotect() on these pages already, and it'd be nice to avoid Yet Another System Call[TM] in a very performance-critical part of the system; furthermore, I tend to think of mprotect() as controlling when to raise SIGSEGV, so it's not *completely* out of place there...

I don't see any problem with doing that.

Just Write The Code. :)

--
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/