HomeFreeBSD

vm_page: use iterators in page allocaction

Description

vm_page: use iterators in page allocaction

Change vm_page_alloc_after() and vm_page_alloc_domain_after() to take
a page iterator argument, to allow for faster insertion into the radix
trie of pages. Where a caller of one of those functions doesn't
already have a page iterator to use, define one. Where vm_page_grab()
is invoked in a loop, invoke a new version with an iterator argument,
and pass the same iterator in each call. Make sure that
vm_page_alloc_after() and vm_page_alloc_domain_after() return with the
iterator in a valid state, even when the object lock was briefly lost
and regained.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D49688

Details

Provenance
dougmAuthored on Mon, Apr 14, 7:05 AM
Reviewer
markj
Differential Revision
D49688: vm_page: uses iterators in page allocaction
Parents
rGc98367641991: vm_fault: Defer marking COW pages valid
Branches
Unknown
Tags
Unknown