Page MenuHomeFreeBSD

iommu_gas: change to first-fit search for lowermatch
ClosedPublic

Authored by dougm on Jun 12 2022, 10:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 3, 7:51 PM
Unknown Object (File)
Thu, Apr 3, 4:52 PM
Unknown Object (File)
Thu, Mar 20, 1:18 AM
Unknown Object (File)
Feb 10 2025, 7:14 PM
Unknown Object (File)
Feb 10 2025, 4:22 AM
Unknown Object (File)
Feb 8 2025, 12:49 PM
Unknown Object (File)
Feb 1 2025, 9:13 PM
Unknown Object (File)
Jan 28 2025, 9:57 PM
Subscribers

Details

Summary

Reverse the order of the search for a free space in lowermatch, to make it a first-fit search. Iommu_gas_match_one always allocates from the beginning of the free gap discovered from searching the tree, so the current code isn't really allocating in a reverse first-fit anyway, and making the search first-fit reduces the number of iommu page table pages that are used.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dougm created this revision.

Please explain why this change is needed in the summary.

This revision is now accepted and ready to land.Jun 13 2022, 6:19 AM

For posterity, in other words, anyone who looks at this review, this change together with the last two changes to this same file have reduced iommu page table page usage by a netperf TCP_MAERTS test from ~181 to ~151.

dougm added a reviewer: kib.