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, Jan 23, 6:39 PM
Unknown Object (File)
Fri, Jan 17, 8:50 PM
Unknown Object (File)
Mon, Dec 30, 3:51 AM
Unknown Object (File)
Sun, Dec 29, 5:40 AM
Unknown Object (File)
Dec 10 2024, 1:06 AM
Unknown Object (File)
Nov 28 2024, 8:35 AM
Unknown Object (File)
Nov 27 2024, 11:20 AM
Unknown Object (File)
Nov 20 2024, 8:54 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.