HomeFreeBSD

iommu_gas: restrict tree search to promising paths

Description

iommu_gas: restrict tree search to promising paths

In iommu_gas_lowermatch and iommu_gas_uppermatch, a subtree search is
quickly terminated if the largest available free space in the subtree
is below a limit, where that limit is related to the size of the
allocation request. However, that limit is too small; it does not
account for both of the guard pages that will surround the allocated
space, but only for one of them. Consequently, it permits the search
to proceed through nodes that cannot produce a successful allocation
for all the requested space. Fix that limit to improve search
performance.

Reviewed by: alc, kib
Submitted by: Weixi Zhu (wxzhu@rice.edu)
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D35414

Details

Provenance
dougmAuthored on Jun 6 2022, 9:26 PM
Reviewer
alc
Differential Revision
D35414: iommu_gas: restrict tree search to promising paths
Parents
rG156745b42d9e: fdescfs: allow chown/utime etc on fdescfs fd for underlying files opened with…
Branches
Unknown
Tags
Unknown