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)
Feb 10 2024, 1:58 AM
Unknown Object (File)
Dec 22 2023, 1:52 AM
Unknown Object (File)
Dec 20 2023, 4:06 AM
Unknown Object (File)
Dec 12 2023, 11:45 AM
Unknown Object (File)
Sep 17 2023, 4:59 PM
Unknown Object (File)
Apr 10 2023, 7:54 PM
Unknown Object (File)
Mar 22 2023, 6:29 PM
Unknown Object (File)
Mar 5 2023, 5:42 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.