Page MenuHomeFreeBSD

Prefer the use of vm_page_domain() to vm_phys_domain()
ClosedPublic

Authored by alc on Jan 6 2021, 7:10 PM.
Tags
None
Referenced Files
F108389324: D28005.diff
Fri, Jan 24, 9:46 AM
Unknown Object (File)
Nov 25 2024, 7:54 AM
Unknown Object (File)
Oct 21 2024, 11:31 AM
Unknown Object (File)
Sep 28 2024, 8:55 AM
Unknown Object (File)
Sep 23 2024, 7:50 PM
Unknown Object (File)
Sep 23 2024, 10:09 AM
Unknown Object (File)
Sep 19 2024, 9:43 AM
Unknown Object (File)
Sep 19 2024, 9:42 AM
Subscribers
None

Details

Summary

When we already have the vm page in hand, use vm_page_domain() instead of vm_phys_domain(). The former has a trivial constant-time implementation whereas the latter iterates over the mem_affinity array. Since both implementations are inlined, this change to just two call sites reduces the code size on amd64 by 320 bytes.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

alc requested review of this revision.Jan 6 2021, 7:10 PM
alc created this revision.

As a note, this code goes with pv_locks patch (AFAIR).

This revision is now accepted and ready to land.Jan 6 2021, 7:15 PM