git: a86373bc93ee - main - vm_object: Report laundry pages in kinfo_vmobject
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 22 Oct 2024 12:50:40 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=a86373bc93ee1c850943e8585d0d426479378145
commit a86373bc93ee1c850943e8585d0d426479378145
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-10-22 12:47:52 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-10-22 12:47:52 +0000
vm_object: Report laundry pages in kinfo_vmobject
Reviewed by: bnovkov, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47214
---
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 8f42cfa36476..02ca69968541 100644
--- a/sys/sys/user.h
+++ b/sys/sys/user.h
@@ -605,7 +605,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_flags;
uint32_t _kvo_ispare[6];
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 5ce21a683541..9fbc489a8eed 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -2575,10 +2575,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++;
}
}