Add an option to reduce pagefault when available in Linux

This option instructs the kernel to synchronously load the entire mapped
region into active memory by specifying `MAP_POPULATE` in `mmap`. It will
cause read-ahead on that memory, and then the subsequent accesses to the
memory can proceed without page faults, improving some performance.
This commit is contained in:
hank 2021-06-26 15:06:13 +08:00
parent 076f815cec
commit 9a66d37d4e
4 changed files with 17 additions and 0 deletions

View file

@ -311,6 +311,9 @@ typedef enum mi_option_e {
mi_option_page_reset,
mi_option_abandoned_page_reset,
mi_option_segment_reset,
#if defined(__linux__)
mi_option_prefault,
#endif
mi_option_eager_commit_delay,
mi_option_reset_delay,
mi_option_use_numa_nodes,