HomeFreeBSD

powerpc/booke: Add pte_find_next() to find the next in-use PTE

Description

powerpc/booke: Add pte_find_next() to find the next in-use PTE

Summary:
Iterating over VM_MIN_ADDRESS->VM_MAXUSER_ADDRESS can take a very long
time iterating one page at a time (2**(log_2(SIZE)-12) operations),
yielding possibly several days or even weeks on 64-bit Book-E, even for
a largely empty, which can happen when swapping out a process by
vmdaemon. Speed this up by instead finding the next PTE at or equal to
the given VA.

Reviewed by: bdragon
Differential Revision: https://reviews.freebsd.org/D24238

Details