]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Eliminate adj_free field from vm_map_entry.
authorkib <kib@FreeBSD.org>
Fri, 29 Mar 2019 16:53:46 +0000 (16:53 +0000)
committerkib <kib@FreeBSD.org>
Fri, 29 Mar 2019 16:53:46 +0000 (16:53 +0000)
commit9df1f562923bd91535f47c2fff5ee36839f8a63a
treedf43e1f78aaff347ac23e134cf54b90c97472c5b
parent5c7bb5ff38f23850571405751e964b34e296b6c6
Eliminate adj_free field from vm_map_entry.

Drop the adj_free field from vm_map_entry_t. Refine the max_free field
so that p->max_free is the size of the largest gap with one endpoint
in the subtree rooted at p. Change vm_map_findspace so that, first,
the address-based splay is restricted to tree nodes with large-enough
max_free value, to avoid searching for the right starting point in a
subtree where all the gaps are too small. Second, when the address
search leads to a tree search for the first large-enough gap, that gap
is the subject of a splay-search that brings the gap to the top of the
tree, so that an immediate insertion will take constant time.

Break up the splay code into separate components, one for searching
and breaking up the tree and another for reassembling it. Use these
components, and not splay itself, for linking and unlinking. Drop the
after-where parameter to link, as it is computed as a side-effect of
the splay search.

Submitted by: Doug Moore <dougm@rice.edu>
Reviewed by: markj
Tested by: pho
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D17794
sys/vm/vm_kern.c
sys/vm/vm_map.c
sys/vm/vm_map.h