mem: mmap the backing store with MAP_NORESERVE
Review Request #2624 - Created Feb. 3, 2015 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10693:40aaf1161841 --------------------------- mem: mmap the backing store with MAP_NORESERVE This patch ensures we can run simulations with very large simulated memories (at least 64 TB based on some quick runs on a Linux workstation). In essence this allows us to efficiently deal with sparse address maps without having to implement a redirection layer in the backing store. This opens up for run-time errors if we eventually exhausts the hosts memory and swap space, but this should hopefully never happen.
Posted (Feb. 3, 2015, 1:37 p.m.)
The patch seems like a landmine for an unsuspecting user as it would be difficult to diagnose if swap space is exhausted. It will probably be evident that memory exhaustion caused the runtime error (segmentation fault), but tracking down the cause to this patch will probably be non-trivial (maybe?). For a user, the memory allocation failure from insufficient swap space would probably be preferable to a hard to diagnose segmentation fault. Even though it is ugly, maybe it's best to add #if 0 / #endif around the code to allow someone to find this later on and enable the feature if they need it (with a warning about the segmentation fault). The memory allocation failure will point the user to the code in this patch.
Review request changed
Updated (Feb. 9, 2015, 6:23 a.m.)
Description: |
|
|||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+37 -4) |
Thanks for making the changes!
