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
F152957802: D28005.diff
Sat, Apr 18, 8:02 AM
Unknown Object (File)
Fri, Apr 17, 9:27 AM
Unknown Object (File)
Wed, Apr 15, 3:18 PM
Unknown Object (File)
Sat, Apr 11, 10:54 PM
Unknown Object (File)
Wed, Apr 1, 3:32 AM
Unknown Object (File)
Thu, Mar 26, 12:27 PM
Unknown Object (File)
Tue, Mar 24, 7:40 PM
Unknown Object (File)
Tue, Mar 24, 4:43 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

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

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