You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page cache: implement page eviction for user-mapped pages
Page cache pages that are mapped by the user process and faulted-in
on-demand are never evicted from the cache until they are unmapped;
this includes all the read-only sections of the user program ELF
(which are never unmapped).
To allow relasing memory from the above pages during low-memory or
out-of-memory conditions, enhance the memory cleaner implementation
so that it scans both shared and private mappings, and evicts "old"
pages, i.e. pages that have not been accessed recently (in OOM
conditions, be more aggressive by evicting even recently accessed
pages). To do the eviction safely on SMP machines, invoke a
synchronous (rendezvous-based) TLB shootdown.
This optimizes memory utilization by the page cache, e.g. it allows
more memory to be released to the host OS via a virtio balloon
device.
This change can cause a SIGBUS signal to be delivered to the user
process when a page cannot be faulted-in during the "ruby_alloc"
end-to-end test; the Ruby program handles this signal by dumping
process state information and then aborting (i.e. raising a SIGABRT
signal); therefore, to make this test pass, add "6" to the list of
expected exit codes for this test.
0 commit comments