]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make a few small changes to vm_map_pmap_enter():
authorAlan Cox <alc@FreeBSD.org>
Sun, 25 Nov 2012 19:42:36 +0000 (19:42 +0000)
committerAlan Cox <alc@FreeBSD.org>
Sun, 25 Nov 2012 19:42:36 +0000 (19:42 +0000)
commita922d312b03b52a9f4db770fdbc4f3d1f086426c
tree552d1a26db1bc027e5ea93575c7ea998a9326d38
parent4f6664174979f9ff8deb921834034aa9d2527870
Make a few small changes to vm_map_pmap_enter():

Add detail to the comment describing this function.  In particular,
describe what MAP_PREFAULT_PARTIAL does.

Eliminate the abrupt change in behavior when the specified address range
grows from MAX_INIT_PT pages to MAX_INIT_PT plus one pages.  Instead of
doing nothing, i.e., preloading no mappings whatsoever, map any resident
pages that fall within the start of the specified address range, i.e.,
[addr, addr + ulmin(size, ptoa(MAX_INIT_PT))).

Long ago, the vm object's list of resident pages was not ordered, so
this function had to choose between probing the global hash table of
all resident pages and iterating over the vm object's unordered list of
resident pages.  Now, the list is ordered, so there is no reason for
MAP_PREFAULT_PARTIAL to be concerned with the vm object's count of
resident changes.

MFC after: 14 days
sys/vm/vm_map.c