#
52526922 |
| 18-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
vm_phys_init: Quiet unused but set warnings about npages.
npages is used in two optional cases:
- to conditionally create a separate DMA32 free list
- to index vm_page_array for VM_PHYSSEG_SPARSE
vm_phys_init: Quiet unused but set warnings about npages.
npages is used in two optional cases:
- to conditionally create a separate DMA32 free list
- to index vm_page_array for VM_PHYSSEG_SPARSE
Add in more #ifdef's around npages statements.
Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D34887
show more ...
|
#
2e7838ae |
| 09-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
vm_phys_early_alloc: mem_index is only used under #ifdef NUMA.
Possibly mem_index should just reuse biggestone since this loop is already reusing biggestsize.
|
#
557dc337 |
| 31-Mar-2022 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: check small blocks to finish allocation
In vm_phys_alloc_queues_contig, in the case that a sequence of max-order blocks are sought to fulfill an allocation, a sequence is ruled out if it do
vm_phys: check small blocks to finish allocation
In vm_phys_alloc_queues_contig, in the case that a sequence of max-order blocks are sought to fulfill an allocation, a sequence is ruled out if it does not have enough max-order blocks to satisfy the allocation. However, there may be smaller blocks of free memory that follow the last max-order block in the sequence, and they may be big enough to complete the allocation request, so check for that possibility before giving up on that block sequence.
Reviewed by: markj Tested by: pho Differential Revision: https://reviews.freebsd.org/D34724
show more ...
|
#
342056fa |
| 31-Mar-2022 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: alloc pages without duplicating searches.
In the search for contiguous pages, as each page segment is examined, check to see if the free list set for the next page segment differs from the
vm_phys: alloc pages without duplicating searches.
In the search for contiguous pages, as each page segment is examined, check to see if the free list set for the next page segment differs from the set for the current segment, and avoid a pointless search if they do not differ.
Discussed with: alc Reviewed by: markj Tested by: pho Differential Revision: https://reviews.freebsd.org/D33947
show more ...
|
#
0ce7909c |
| 19-Jan-2022 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: add essential segment bounds check
A lower-bound segment check is necessary in vm_phys_alloc_seg_contig. Add one.
Reported by: jenkins Reviewed by: alc Fixes: da92ecbc0d8f vm_phys: fix seg
vm_phys: add essential segment bounds check
A lower-bound segment check is necessary in vm_phys_alloc_seg_contig. Add one.
Reported by: jenkins Reviewed by: alc Fixes: da92ecbc0d8f vm_phys: fix seg->end test in alloc_seg_contig MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33945
show more ...
|
#
da92ecbc |
| 18-Jan-2022 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: fix seg->end test in alloc_seg_contig
In vm_phys_alloc_seg_contig, in allocating multiple memory blocks for a huge allocation, ensure that the end of the allocated range does not exceed the
vm_phys: fix seg->end test in alloc_seg_contig
In vm_phys_alloc_seg_contig, in allocating multiple memory blocks for a huge allocation, ensure that the end of the allocated range does not exceed the upper segment limit.
Reorder a couple of checks to improve code layout.
Reviewed by: alc MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33870
show more ...
|
#
e6930b1c |
| 31-Dec-2021 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: convert error back to warning
Move an assignment back to where it was before, to turn the defined-but-not-used error back into a set-but-not-used warning.
Fixes: 01e115ab83a4 vm_phys: #inc
vm_phys: convert error back to warning
Move an assignment back to where it was before, to turn the defined-but-not-used error back into a set-but-not-used warning.
Fixes: 01e115ab83a4 vm_phys: #include vm_extern
show more ...
|
#
01e115ab |
| 31-Dec-2021 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: #include vm_extern
Arm64 and powerpc don't include vm_extern.h indirectly in vm_phys.c, which means that for the sake of those architectures, it must be included explicitly.
Also, fix a se
vm_phys: #include vm_extern
Arm64 and powerpc don't include vm_extern.h indirectly in vm_phys.c, which means that for the sake of those architectures, it must be included explicitly.
Also, fix a set-unused warning that jenkins also found.
Reported by: Jenkins Fixes: c606ab59e7f9 vm_extern: use standard address checkers everywhere
show more ...
|
#
c606ab59 |
| 31-Dec-2021 |
Doug Moore <dougm@FreeBSD.org> |
vm_extern: use standard address checkers everywhere
Define simple functions for alignment and boundary checks and use them everywhere instead of having slightly different implementations scattered a
vm_extern: use standard address checkers everywhere
Define simple functions for alignment and boundary checks and use them everywhere instead of having slightly different implementations scattered about. Define them in vm_extern.h and use them where possible where vm_extern.h is included.
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D33685
show more ...
|
#
8119cdd3 |
| 29-Dec-2021 |
Doug Moore <dougm@FreeBSD.org> |
vm_phys: hide vm_phys_set_pool
It is only called in the file that defines it, so make it static and remove the declaration from the header.
Reviewed by: kib Differential Revision: https://reviews.f
vm_phys: hide vm_phys_set_pool
It is only called in the file that defines it, so make it static and remove the declaration from the header.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D33688
show more ...
|
Revision tags: release/12.3.0 |
|
#
31991a5a |
| 29-Sep-2021 |
Mitchell Horne <mhorne@FreeBSD.org> |
minidump: De-duplicate is_dumpable()
The function is identical in each minidump implementation, so move it to vm_phys.c. The only slight exception is powerpc where the function was public, for use i
minidump: De-duplicate is_dumpable()
The function is identical in each minidump implementation, so move it to vm_phys.c. The only slight exception is powerpc where the function was public, for use in moea64_scan_pmap().
Reviewed by: kib, markj, imp (earlier version) MFC after: 2 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D31884
show more ...
|
Revision tags: release/13.0.0 |
|
#
431fb8ab |
| 19-Nov-2020 |
Mark Johnston <markj@FreeBSD.org> |
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
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
show more ...
|
Revision tags: release/12.2.0 |
|
#
114484b7 |
| 23-Sep-2020 |
Mark Johnston <markj@FreeBSD.org> |
Flag vm_reserv and vm_phys sysctls as MPSAFE.
Nothing in these subsystems relies on Giant.
MFC after: 1 week
|
Revision tags: release/11.4.0 |
|
#
81302f1d |
| 28-May-2020 |
Mark Johnston <markj@FreeBSD.org> |
Fix boot on systems where NUMA domain 0 is unpopulated.
- Add vm_phys_early_add_seg(), complementing vm_phys_early_alloc(), to ensure that segments registered during hammer_time() are placed in th
Fix boot on systems where NUMA domain 0 is unpopulated.
- Add vm_phys_early_add_seg(), complementing vm_phys_early_alloc(), to ensure that segments registered during hammer_time() are placed in the right domain. Otherwise, since the SRAT is not parsed at that point, we just add them to domain 0, which may be incorrect and results in a domain with only several MB worth of memory. - Fix uma_startup1() to try allocating memory for zones from any domain. If domain 0 is unpopulated, the allocation will simply fail, resulting in a page fault slightly later during boot. - Change _vm_phys_domain() to return -1 for addresses not covered by the affinity table, and change vm_phys_early_alloc() to handle wildcard domains. This is necessary on amd64, where the page array is dense and pmap_page_array_startup() may allocate page table pages for non-existent page frames.
Reported and tested by: Rafael Kitover <rkitover@gmail.com> Reviewed by: cem (earlier version), kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25001
show more ...
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|
#
7029da5c |
| 26-Feb-2020 |
Pawel Biernacki <kaktus@FreeBSD.org> |
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly mark
Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718
show more ...
|
#
b649c2ac |
| 22-Dec-2019 |
Doug Moore <dougm@FreeBSD.org> |
Fix typo using RB_INITIALIZER.
The macro RB_INITIALIZER ignores its argument, but is documented to require "&head" as argument to initialize "head". So using "_vm_phys_fictitious_tree" as the argum
Fix typo using RB_INITIALIZER.
The macro RB_INITIALIZER ignores its argument, but is documented to require "&head" as argument to initialize "head". So using "_vm_phys_fictitious_tree" as the argument to initialize "vm_phys_fictitious_tree" is an inconsequential error, corrected here.
Discussed with: alc
show more ...
|
Revision tags: release/12.1.0 |
|
#
3921068f |
| 18-Aug-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Remove unnecessary debugging from r351181 that caused powerpc build to fail.
Tested by: make universe TARGETS=powerpc
|
#
be3f5f29 |
| 18-Aug-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
vm_phys_avail_find is only used on NUMA kernels. Fix a build error.
|
#
b7565d44 |
| 18-Aug-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Encapsulate phys_avail manipulation in a set of simple routines. Add a NUMA aware boot time memory allocator that will be used to allocate early domain correct structures. Code partially submitted
Encapsulate phys_avail manipulation in a set of simple routines. Add a NUMA aware boot time memory allocator that will be used to allocate early domain correct structures. Code partially submitted by gallatin.
Reviewed by: gallatin, kib Tested by: pho Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21251
show more ...
|
#
21943937 |
| 16-Aug-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Move phys_avail definition into MI code. It is consumed in the MI layer and doing so adds more flexibility with less redundant code.
Reviewed by: jhb, markj, kib Sponsored by: Netflix Differential
Move phys_avail definition into MI code. It is consumed in the MI layer and doing so adds more flexibility with less redundant code.
Reviewed by: jhb, markj, kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D21250
show more ...
|
#
c1685086 |
| 06-Aug-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
Add two new kernel options to control memory locality on NUMA hardware. - UMA_XDOMAIN enables an additional per-cpu bucket for freed memory that was freed on a different domain from where it was
Add two new kernel options to control memory locality on NUMA hardware. - UMA_XDOMAIN enables an additional per-cpu bucket for freed memory that was freed on a different domain from where it was allocated. This is only used for UMA_ZONE_NUMA (first-touch) zones. - UMA_FIRSTTOUCH sets the default UMA policy to be first-touch for all zones. This tries to maintain locality for kernel memory.
Reviewed by: gallatin, alc, kib Tested by: pho, gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20929
show more ...
|
Revision tags: release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|
#
b8590dae |
| 31-May-2019 |
Doug Moore <dougm@FreeBSD.org> |
The function vm_phys_free_contig invokes vm_phys_free_pages for every power-of-two page block it frees, launching an unsuccessful search for a buddy to pair up with each time. The only possible budd
The function vm_phys_free_contig invokes vm_phys_free_pages for every power-of-two page block it frees, launching an unsuccessful search for a buddy to pair up with each time. The only possible buddy-up mergers are across the boundaries of the freed region, so change vm_phys_free_contig simply to enqueue the freed interior blocks, via a new function vm_phys_enqueue_contig, and then call vm_phys_free_pages on the bounding blocks to create as big a cross-boundary block as possible after buddy-merging.
The only callers of vm_phys_free_contig at the moment call it in situations where merging blocks across the boundary is clearly impossible, so just call vm_phys_enqueue_contig in those places and avoid trying to buddy-up at all.
One beneficiary of this change is in breaking reservations. For the case where memory is freed in breaking a reservation with only the first and last pages allocated, the number of cycles consumed by the operation drops about 11% with this change.
Suggested by: alc Reviewed by: alc Approved by: kib, markj (mentors) Differential Revision: https://reviews.freebsd.org/D16901
show more ...
|
#
2aaf9152 |
| 18-Mar-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead@r345275
|