#
3e04ae43 |
| 14-Jul-2023 |
Doug Moore <dougm@FreeBSD.org> |
vm_radix_init: use initializer
Several vm_radix tries are not initialized with vm_radix_init. That works, for now, since static initialization zeroes the root field anyway, but if initialization cha
vm_radix_init: use initializer
Several vm_radix tries are not initialized with vm_radix_init. That works, for now, since static initialization zeroes the root field anyway, but if initialization changes, these tries will fail. Add missing initializer calls.
Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D40971
show more ...
|
Revision tags: release/13.2.0 |
|
#
c3821149 |
| 15-Feb-2023 |
Ed Maste <emaste@FreeBSD.org> |
Drop space in "vm object" lock name to improve wchan
Lock names are shown in top as a `*` followed by the first five characters of the name. `*vmobj` a little more obvious and easier to search for
Drop space in "vm object" lock name to improve wchan
Lock names are shown in top as a `*` followed by the first five characters of the name. `*vmobj` a little more obvious and easier to search for than `*vm ob`.
Differential Revision: https://reviews.freebsd.org/D36264
show more ...
|
#
6189672e |
| 18-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Handle ERELOOKUP from VOP_FSYNC() in several other places
We need to repeat the operation if the vnode was relocked.
Reported and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundat
Handle ERELOOKUP from VOP_FSYNC() in several other places
We need to repeat the operation if the vnode was relocked.
Reported and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38114
show more ...
|
#
70e1b112 |
| 19-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object.c: minor style
Sponsored by: The FreeBSD Foundation MFC after: 3 days
|
#
b050ee6c |
| 16-Jan-2023 |
Mark Johnston <markj@FreeBSD.org> |
vm_object: Fix a kernel memory disclosure via the vm_object list sysctl
Reported by: Chris J-D <chris@accessvector.net> MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
Revision tags: release/12.4.0 |
|
#
03d6764b |
| 11-Nov-2022 |
Mitchell Horne <mhorne@FreeBSD.org> |
ddb: don't limit pindex output in 'show vmopag'
This command already prints a tremendous amount of output, and properly obeys the pager. It no longer makes sense to arbitrarily limit the pages that
ddb: don't limit pindex output in 'show vmopag'
This command already prints a tremendous amount of output, and properly obeys the pager. It no longer makes sense to arbitrarily limit the pages that are printed, as the reader will not be aware that this has happened.
Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D37361
show more ...
|
#
c84c5e00 |
| 18-Jul-2022 |
Mitchell Horne <mhorne@FreeBSD.org> |
ddb: annotate some commands with DB_CMD_MEMSAFE
This is not completely exhaustive, but covers a large majority of commands in the tree.
Reviewed by: markj Sponsored by: Juniper Networks, Inc. Spons
ddb: annotate some commands with DB_CMD_MEMSAFE
This is not completely exhaustive, but covers a large majority of commands in the tree.
Reviewed by: markj Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35583
show more ...
|
#
7f3c78fb |
| 16-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm_pager: Remove references to KVME_TYPE_DEFAULT in the kernel
Keep the definition around since it's used by userspace.
Reviewed by: alc, imp, kib Tested by: pho Sponsored by: The FreeBSD Foundatio
vm_pager: Remove references to KVME_TYPE_DEFAULT in the kernel
Keep the definition around since it's used by userspace.
Reviewed by: alc, imp, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35791
show more ...
|
#
fff19e0e |
| 16-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm_object: Remove redundant OBJ_SWAP checks
With the removal of OBJT_DEFAULT, OBJ_ANON implies OBJ_SWAP.
Note, this means that vm_object_split() is more expensive than it used to be, as it holds bu
vm_object: Remove redundant OBJ_SWAP checks
With the removal of OBJT_DEFAULT, OBJ_ANON implies OBJ_SWAP.
Note, this means that vm_object_split() is more expensive than it used to be, as it holds busy locks until the end of the range is reached, even if the object has no swap blocks allocated.
Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35789
show more ...
|
#
0cb2610e |
| 16-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm: Remove handling for OBJT_DEFAULT objects
Now that OBJT_DEFAULT objects can't be instantiated, we can simplify checks of the form object->type == OBJT_DEFAULT || (object->flags & OBJ_SWAP) != 0.
vm: Remove handling for OBJT_DEFAULT objects
Now that OBJT_DEFAULT objects can't be instantiated, we can simplify checks of the form object->type == OBJT_DEFAULT || (object->flags & OBJ_SWAP) != 0. No functional change intended.
Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35788
show more ...
|
#
fffc1c59 |
| 16-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm_object: Release object swap charge in the swap pager destructor
With the removal of OBJT_DEFAULT, we can simply handle this in swap_pager_dealloc(). No functional change intended.
Suggested by:
vm_object: Release object swap charge in the swap pager destructor
With the removal of OBJT_DEFAULT, we can simply handle this in swap_pager_dealloc(). No functional change intended.
Suggested by: alc Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35787
show more ...
|
#
5d32157d |
| 16-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm_object: Modify vm_object_allocate_anon() to return OBJT_SWAP objects
With this change, OBJT_DEFAULT objects are no longer allocated. Instead, anonymous objects are always of type OBJT_SWAP and al
vm_object: Modify vm_object_allocate_anon() to return OBJT_SWAP objects
With this change, OBJT_DEFAULT objects are no longer allocated. Instead, anonymous objects are always of type OBJT_SWAP and always have OBJ_SWAP set.
Modify the page fault handler to check the swap block radix tree in places where it checked for objects of type OBJT_DEFAULT. In particular, there's no need to invoke getpages for an OBJT_SWAP object with no swap blocks assigned.
Reviewed by: alc, kib Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35785
show more ...
|
#
e1979b45 |
| 12-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm_object: Assert that overcommit charge is released in the object dtor
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.or
vm_object: Assert that overcommit charge is released in the object dtor
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35780
show more ...
|
#
630f633f |
| 14-Jun-2022 |
Mark Johnston <markj@FreeBSD.org> |
vm_object: Use the vm_object_(set|clear)_flag() helpers
... rather than setting and clearing flags inline. No functional change intended.
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The
vm_object: Use the vm_object_(set|clear)_flag() helpers
... rather than setting and clearing flags inline. No functional change intended.
Reviewed by: alc, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35469
show more ...
|
Revision tags: release/13.1.0 |
|
#
4cf9f5d8 |
| 17-Dec-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object: restore handling of shadow_count for all type of objects
instead of only OBJ_ANON objects that are backing, as it is now. This is required for e.g. vm_meter is_object_active() detection,
vm_object: restore handling of shadow_count for all type of objects
instead of only OBJ_ANON objects that are backing, as it is now. This is required for e.g. vm_meter is_object_active() detection, and should be useful in some more cases.
Use refcount KPI for all objects, regardless of owning the object lock, and the fact that currently OBJ_ANON cannot change for the live object.
Noted and reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33549
show more ...
|
#
18048b6e |
| 17-Dec-2021 |
Stephen J. Kiernan <stevek@FreeBSD.org> |
Eliminate key press requirement "show vmopag" command output.
Summary: One was required to press a key to continue after every 18 lines of output. This requirement had been in the "show vmopag" comm
Eliminate key press requirement "show vmopag" command output.
Summary: One was required to press a key to continue after every 18 lines of output. This requirement had been in the "show vmopag" command since it was introduced, which was many years before paging was added to DDB. With paging, this explict key check is no longer necessary.
Obtained from: Juniper Networks, Inc. MFC after: 1 week
Test Plan: Run "show vmopag" from db> prompt and see that it does not need additional keypresses other than the ones needed for the pager.
Subscribers: imp, #contributor_reviews_base
Differential Revision: https://reviews.freebsd.org/D33550
show more ...
|
#
cd37afd8 |
| 20-Dec-2021 |
Rick Macklem <rmacklem@FreeBSD.org> |
vm_object: Make is_object_active() global
Commit 867c27c23a5c modified the NFS client so that it does IO_APPEND writes directly to the NFS server, bypassing the buffer cache. However, this could re
vm_object: Make is_object_active() global
Commit 867c27c23a5c modified the NFS client so that it does IO_APPEND writes directly to the NFS server, bypassing the buffer cache. However, this could result in stale data in client pages when the file is mmap(2)'d. As such, the NFS client needs to call is_object_active() to check if the file is mmap(2)'d.
This patch renames is_object_active() to vm_object_is_active(), moves it to sys/vm/vm_object.c and makes it global, so that the NFS client can call it in a future commit.
Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D33520
show more ...
|
Revision tags: release/12.3.0 |
|
#
d28af1ab |
| 15-Nov-2021 |
Mark Johnston <markj@FreeBSD.org> |
vm: Add a mode to vm_object_page_remove() which skips invalid pages
This will be used to break a deadlock in ZFS between the per-mountpoint teardown lock and page busy locks. In particular, when pu
vm: Add a mode to vm_object_page_remove() which skips invalid pages
This will be used to break a deadlock in ZFS between the per-mountpoint teardown lock and page busy locks. In particular, when purging data from the page cache during dataset rollback, we want to avoid blocking on the busy state of invalid pages since the busying thread may be blocked on the teardown lock in zfs_getpages().
Add a helper, vn_pages_remove_valid(), for use by filesystems. Bump __FreeBSD_version so that the OpenZFS port can make use of the new helper.
PR: 258208 Reviewed by: avg, kib, sef Tested by: pho (part of a larger patch) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32931
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 ...
|
#
350fc36b |
| 08-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
sysctl vm.objects: yield if hog
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
|
#
7738118e |
| 13-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm.objects_swap: disable reporting some information
For making the call faster, do not count active/inactive object queues, and do not report vnode info if any (for tmpfs).
Reviewed by: markj Spons
vm.objects_swap: disable reporting some information
For making the call faster, do not count active/inactive object queues, and do not report vnode info if any (for tmpfs).
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
show more ...
|
#
42812ccc |
| 13-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add vm.swap_objects sysctl
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
|
#
1b610624 |
| 13-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object_list: split sysctl handler in separate function
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31163
|
#
28bc23ab |
| 07-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
tmpfs: dynamically register tmpfs pager
Remove OBJT_SWAP_TMPFS. Move tmpfs-specific swap pager bits into tmpfs_subr.c.
There is no longer any code to directly support tmpfs in sys/vm, most tmpfs kn
tmpfs: dynamically register tmpfs pager
Remove OBJT_SWAP_TMPFS. Move tmpfs-specific swap pager bits into tmpfs_subr.c.
There is no longer any code to directly support tmpfs in sys/vm, most tmpfs knowledge is shared by non-anon swap object type implementation. The tmpfs-specific methods are provided by registered tmpfs pager, which inherits from the swap pager.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30168
show more ...
|
#
b730fd30 |
| 07-May-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
vm: Add KPI to dynamically register pagers
Pager is allowed to inherit part of its implementation from the existing pager, which is done by copying non-NULL virtual method slots.
Reviewed by: markj
vm: Add KPI to dynamically register pagers
Pager is allowed to inherit part of its implementation from the existing pager, which is done by copying non-NULL virtual method slots.
Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D30168
show more ...
|