Revision tags: release/13.2.0, release/12.4.0 |
|
#
934bfc12 |
| 18-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
Add vm_page_any_valid()
Use it and several other vm_page_*_valid() functions in more places.
Suggested and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week D
Add vm_page_any_valid()
Use it and several other vm_page_*_valid() functions in more places.
Suggested and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37024
show more ...
|
Revision tags: release/13.1.0 |
|
#
d950c589 |
| 29-Jan-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
vm/vm_extern.h, vm/vm_page.h: use sys/kassert.h
instead of fatty sys/systm.h.
Suggested by: jhb Reviewed by: alc, imp, jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
vm/vm_extern.h, vm/vm_page.h: use sys/kassert.h
instead of fatty sys/systm.h.
Suggested by: jhb Reviewed by: alc, imp, jhb (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34089
show more ...
|
Revision tags: release/12.3.0 |
|
#
a2665158 |
| 15-Nov-2021 |
Mark Johnston <markj@FreeBSD.org> |
vm_page: Remove vm_page_sbusy() and vm_page_xbusy()
They are unused today and cannot be safely used in the face of unlocked lookup, in which pages may be busied without the object lock held.
Obtain
vm_page: Remove vm_page_sbusy() and vm_page_xbusy()
They are unused today and cannot be safely used in the face of unlocked lookup, in which pages may be busied without the object lock held.
Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32948
show more ...
|
#
87b64663 |
| 15-Nov-2021 |
Mark Johnston <markj@FreeBSD.org> |
vm_page: Consolidate page busy sleep mechanisms
- Modify vm_page_busy_sleep() and vm_page_busy_sleep_unlocked() to take a VM_ALLOC_* flag indicating whether to sleep on shared-busy, and fix up c
vm_page: Consolidate page busy sleep mechanisms
- Modify vm_page_busy_sleep() and vm_page_busy_sleep_unlocked() to take a VM_ALLOC_* flag indicating whether to sleep on shared-busy, and fix up callers. - Modify vm_page_busy_sleep() to return a status indicating whether the object lock was dropped, and fix up callers. - Convert callers of vm_page_sleep_if_busy() to use vm_page_busy_sleep() instead. - Remove vm_page_sleep_if_(x)busy().
No functional change intended.
Obtained from: jeff (object_concurrency patches) Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32947
show more ...
|
#
a9d6f1fe |
| 20-Oct-2021 |
Mark Johnston <markj@FreeBSD.org> |
Remove some remaining references to VM_ALLOC_NOOBJ
Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32037
|
#
c40cf9bc |
| 20-Oct-2021 |
Mark Johnston <markj@FreeBSD.org> |
vm_page: Stop handling VM_ALLOC_NOOBJ in vm_page_alloc_domain_after()
This makes the allocator simpler since it can assume object != NULL. Also modify the function to unconditionally preserve PG_ZER
vm_page: Stop handling VM_ALLOC_NOOBJ in vm_page_alloc_domain_after()
This makes the allocator simpler since it can assume object != NULL. Also modify the function to unconditionally preserve PG_ZERO, so VM_ALLOC_ZERO is effectively ignored (and still must be implemented by the caller for now).
Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32033
show more ...
|
#
92db9f3b |
| 20-Oct-2021 |
Mark Johnston <markj@FreeBSD.org> |
Introduce vm_page_alloc_noobj_contig()
This is the same as vm_page_alloc_noobj(), but allocates physically contiguous runs of memory. For now it is implemented in terms of vm_page_alloc_contig(), w
Introduce vm_page_alloc_noobj_contig()
This is the same as vm_page_alloc_noobj(), but allocates physically contiguous runs of memory. For now it is implemented in terms of vm_page_alloc_contig(), with the difference that vm_page_alloc_noobj_contig() implements VM_ALLOC_ZERO by zeroing the page.
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32005
show more ...
|
#
b498f71b |
| 20-Oct-2021 |
Mark Johnston <markj@FreeBSD.org> |
vm_page: Add a new page allocator interface for unnamed pages
The diff adds vm_page_alloc_noobj() and vm_page_alloc_noobj_domain(). These mostly correspond to vm_page_alloc() and vm_page_alloc_domai
vm_page: Add a new page allocator interface for unnamed pages
The diff adds vm_page_alloc_noobj() and vm_page_alloc_noobj_domain(). These mostly correspond to vm_page_alloc() and vm_page_alloc_domain() when no VM object is specified, with the exception that they handle VM_ALLOC_ZERO by zeroing the page, rather than by preserving PG_ZERO.
This simplifies callers and will permit simplification of the vm_page_alloc_domain() definition.
Since the new allocator variant is similar to vm_page_alloc_freelist(), implement both of them using a common backend allocator function. No functional change intended.
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31985
show more ...
|
#
5b10e79e |
| 17-Jun-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Un-staticise vm_page_init_page()
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30785
|
Revision tags: release/13.0.0 |
|
#
660344ca |
| 29-Jan-2021 |
Ryan Stone <rstone@FreeBSD.org> |
Add a VM flag to prevent reclaim on a failed contig allocation
If a M_WAITOK contig alloc fails, the VM subsystem will try to reclaim contiguous memory twice before actually failing the request. On
Add a VM flag to prevent reclaim on a failed contig allocation
If a M_WAITOK contig alloc fails, the VM subsystem will try to reclaim contiguous memory twice before actually failing the request. On a system with 64GB of RAM I've observed this take 400-500ms before it finally gives up, and I believe that this will only be worse on systems with even more memory.
In certain contexts this delay is extremely harmful, so add a flag that will skip reclaim for allocation requests to allow those paths to opt-out of doing an expensive reclaim.
Sponsored by: Dell Inc Differential Revision: https://reviews.freebsd.org/D28422 Reviewed by: markj, kib
show more ...
|
#
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 |
|
#
6f3b523c |
| 15-Oct-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Avoid dump_avail[] redefinition.
Move dump_avail[] extern declaration and inlines into a new header vm/vm_dumpset.h. This fixes default gcc build for mips.
Reviewed by: alc, scottph Tested by: kev
Avoid dump_avail[] redefinition.
Move dump_avail[] extern declaration and inlines into a new header vm/vm_dumpset.h. This fixes default gcc build for mips.
Reviewed by: alc, scottph Tested by: kevans (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D26741
show more ...
|
#
c2c6fb90 |
| 10-Oct-2020 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Use unlocked page lookup for inmem() to avoid object lock contention
Reviewed By: kib, markj Submitted by: mlaier Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D26653
|
#
42f96162 |
| 09-Oct-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_page_dump_index_to_pa(): Add braces to the expression involving + and &.
The precedence of the '&' operator is less than of '+'. Added braces do change the order of evaluation into the natural o
vm_page_dump_index_to_pa(): Add braces to the expression involving + and &.
The precedence of the '&' operator is less than of '+'. Added braces do change the order of evaluation into the natural one, in my opinion. On the other hand, the value of the expression should not change since all elements should have page-aligned values.
This fixes a gcc warning reported.
Reported by: adrian Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
00e66147 |
| 22-Sep-2020 |
D Scott Phillips <scottph@FreeBSD.org> |
Sparsify the vm_page_dump bitmap
On Ampere Altra systems, the sparse population of RAM within the physical address space causes the vm_page_dump bitmap to be much larger than necessary, increasing t
Sparsify the vm_page_dump bitmap
On Ampere Altra systems, the sparse population of RAM within the physical address space causes the vm_page_dump bitmap to be much larger than necessary, increasing the size from ~8 Mib to > 2 Gib (and overflowing `int` for the size).
Changing the page dump bitmap also changes the minidump file format, so changes are also necessary in libkvm.
Reviewed by: jhb Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26131
show more ...
|
#
ab041f71 |
| 22-Sep-2020 |
D Scott Phillips <scottph@FreeBSD.org> |
Move vm_page_dump bitset array definition to MI code
These definitions were repeated by all architectures, with small variations. Consolidate the common definitons in machine independent code and us
Move vm_page_dump bitset array definition to MI code
These definitions were repeated by all architectures, with small variations. Consolidate the common definitons in machine independent code and use bitset(9) macros for manipulation. Many opportunities for deduplication remain in the machine dependent minidump logic. The only intended functional change is increasing the bit index type to vm_pindex_t, allowing the indexing of pages with address of 8 TiB and greater.
Reviewed by: kib, markj Approved by: scottl (implicit) MFC after: 1 week Sponsored by: Ampere Computing, Inc. Differential Revision: https://reviews.freebsd.org/D26129
show more ...
|
#
de6fc2e3 |
| 15-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r364082 through r364250.
|
#
440cec3f |
| 12-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
0292c54b |
| 11-Aug-2020 |
Conrad Meyer <cem@FreeBSD.org> |
Add support for multithreading the inactive queue pageout within a domain.
In very high throughput workloads, the inactive scan can become overwhelmed as you have many cores producing pages and a si
Add support for multithreading the inactive queue pageout within a domain.
In very high throughput workloads, the inactive scan can become overwhelmed as you have many cores producing pages and a single core freeing. Since Mark's introduction of batched pagequeue operations, we can now run multiple inactive threads working on independent batches.
To avoid confusing the pid and other control algorithms, I (Jeff) do this in a mpi-like fan out and collect model that is driven from the primary page daemon. It decides whether the shortfall can be overcome with a single thread and if not dispatches multiple threads and waits for their results.
The heuristic is based on timing the pageout activity and averaging a pages-per-second variable which is exponentially decayed. This is visible in sysctl and may be interesting for other purposes.
I (Jeff) have verified that this does indeed double our paging throughput when used with two threads. With four we tend to run into other contention problems. For now I would like to commit this infrastructure with only a single thread enabled.
The number of worker threads per domain can be controlled with the 'vm.pageout_threads_per_domain' tunable.
Submitted by: jeff (earlier version) Discussed with: markj Tested by: pho Sponsored by: probably Netflix (based on contemporary commits) Differential Revision: https://reviews.freebsd.org/D21629
show more ...
|
#
e383ec74 |
| 06-Aug-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r363739 through r363986.
|
#
efec381d |
| 04-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Remove most lingering references to the page lock in comments.
Finish updating comments to reflect new locking protocols introduced over the past year. In particular, vm_page_lock is now effectivel
Remove most lingering references to the page lock in comments.
Finish updating comments to reflect new locking protocols introduced over the past year. In particular, vm_page_lock is now effectively unused.
Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25868
show more ...
|
#
c7aa572c |
| 31-Jul-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
17996960 |
| 31-Jul-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r363583 through r363738.
|
#
958d8f52 |
| 29-Jul-2020 |
Mark Johnston <markj@FreeBSD.org> |
Remove the volatile qualifier from busy_lock.
Use atomic(9) to load the lock state. Some places were doing this already, so it was inconsistent. In initialization code, the lock state is still ini
Remove the volatile qualifier from busy_lock.
Use atomic(9) to load the lock state. Some places were doing this already, so it was inconsistent. In initialization code, the lock state is still initialized with plain stores.
Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25861
show more ...
|
#
f72e5be5 |
| 28-Jul-2020 |
Mark Johnston <markj@FreeBSD.org> |
vm_page_xbusy_claim(): Use atomics to update busy lock state.
vm_page_xbusy_claim() could clobber the waiter bit. For its original use, kernel memory pages, this was not a problem since nothing wou
vm_page_xbusy_claim(): Use atomics to update busy lock state.
vm_page_xbusy_claim() could clobber the waiter bit. For its original use, kernel memory pages, this was not a problem since nothing would ever block on the busy lock for such pages. r363607 introduced a new use where this could in principle be a problem.
Fix the problem by using atomic_cmpset to update the lock owner. Since this macro is defined only for INVARIANTS kernels the extra overhead doesn't seem prohibitive.
Reported by: vangyzen Reviewed by: alc, kib, vangyzen Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25859
show more ...
|