]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_phys: Try to clean up NUMA KPIs
authorMark Johnston <markj@FreeBSD.org>
Thu, 19 Nov 2020 03:59:21 +0000 (03:59 +0000)
committerMark Johnston <markj@FreeBSD.org>
Thu, 19 Nov 2020 03:59:21 +0000 (03:59 +0000)
commit431fb8abd7946ccb6710b41337ba8476fea448f2
treeb00d2105ae000baf338029a6659dfaecc4e4795b
parent2e58ec0123d31b31ff0dd0857cefea2ce11d49d9
vm_phys: Try to clean up NUMA KPIs

It can useful for code outside the VM system to look up the NUMA domain
of a page backing a virtual or physical address, specifically when
creating NUMA-aware data structures.  We have _vm_phys_domain() for
this, but the leading underscore implies that it's an internal function,
and vm_phys.h has dependencies on a number of other headers.

Rename vm_phys_domain() to vm_page_domain(), and _vm_phys_domain() to
vm_phys_domain().  Make the latter an inline function.

Add _vm_phys.h and define struct vm_phys_seg there so that it's easier
to use in other headers.  Include it from vm_page.h so that
vm_page_domain() can be defined there.

Include machine/vmparam.h from _vm_phys.h since it depends directly on
some constants defined there.

Reviewed by: alc
Reviewed by: dougm, kib (earlier versions)
Differential Revision: https://reviews.freebsd.org/D27207
14 files changed:
sys/amd64/amd64/mp_machdep.c
sys/amd64/amd64/pmap.c
sys/dev/mem/memdev.c
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/aim/mmu_radix.c
sys/vm/_vm_phys.h [new file with mode: 0644]
sys/vm/uma_core.c
sys/vm/vm_kern.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pagequeue.h
sys/vm/vm_phys.c
sys/vm/vm_phys.h
sys/vm/vm_reserv.c