summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2007-05-22 04:45:59 +0000
committeralc <alc@FreeBSD.org>2007-05-22 04:45:59 +0000
commit08b2128056d0d589d894f995bccdd7e9c20652f1 (patch)
tree4689f7da07489bbbb2581f087fed293972643bcd /lib
parente4c186657b8eb555fef2678dd703b9b70546e75b (diff)
downloadFreeBSD-src-08b2128056d0d589d894f995bccdd7e9c20652f1.zip
FreeBSD-src-08b2128056d0d589d894f995bccdd7e9c20652f1.tar.gz
Eliminate the reactivation of cached pages in vm_fault_prefault() and
vm_map_pmap_enter() unless the caller is madvise(MADV_WILLNEED). With the exception of calls to vm_map_pmap_enter() from madvise(MADV_WILLNEED), vm_fault_prefault() and vm_map_pmap_enter() are both used to create speculative mappings. Thus, always reactivating cached pages is a mistake. In principle, cached pages should only be reactivated by an actual access. Otherwise, the following misbehavior can occur. On a hard fault for a text page the clustering algorithm fetches not only the required page but also several of the adjacent pages. Now, suppose that one or more of the adjacent pages are never accessed. Ultimately, these unused pages become cached pages through the efforts of the page daemon. However, the next activation of the executable reactivates and maps these unused pages. Consequently, they are never replaced. In effect, they become pinned in memory.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud