git: 9c139dd5bf40 - stable/13 - vm_object: Report laundry pages in kinfo_vmobject
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Oct 2024 14:20:08 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=9c139dd5bf40968f1e84ef607927acee4b80e7fd
commit 9c139dd5bf40968f1e84ef607927acee4b80e7fd
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-10-22 12:47:52 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-29 13:34:33 +0000
vm_object: Report laundry pages in kinfo_vmobject
Reviewed by: bnovkov, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47214
(cherry picked from commit a86373bc93ee1c850943e8585d0d426479378145)
---
sys/sys/user.h | 3 ++-
sys/vm/vm_object.c | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sys/sys/user.h b/sys/sys/user.h
index c6894c527143..13062d67a69d 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -593,7 +593,8 @@ struct kinfo_vmobject {
uint64_t _kvo_backing_obj; /* Handle for the backing obj */
} kvo_type_spec; /* Type-specific union */
uint64_t kvo_me; /* Uniq handle for anon obj */
- uint64_t _kvo_qspare[6];
+ uint64_t kvo_laundry; /* Number of laundry pages. */
+ uint64_t _kvo_qspare[5];
uint32_t kvo_swapped; /* Number of swapped pages */
uint32_t _kvo_ispare[7];
char kvo_path[PATH_MAX]; /* Pathname, if any. */
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 6da30800896e..8ae9fe50833d 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -2618,10 +2618,12 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
* sysctl is only meant to give an
* approximation of the system anyway.
*/
- if (m->a.queue == PQ_ACTIVE)
+ if (vm_page_active(m))
kvo->kvo_active++;
- else if (m->a.queue == PQ_INACTIVE)
+ else if (vm_page_inactive(m))
kvo->kvo_inactive++;
+ else if (vm_page_in_laundry(m))
+ kvo->kvo_laundry++;
}
}