From nobody Tue Oct 29 13:34:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XdB7D2SwSz5bT8Z; Tue, 29 Oct 2024 13:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XdB7D1xkLz4CxY; Tue, 29 Oct 2024 13:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730208856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W63SIOg5hLf6t46JHaqC0x+5HoByWlHphn1WBiTl3h0=; b=G3mU539SBLghL8gIIte88xvcq+FsrXo3RxidXNpKZmWlRX2qXIbQZvxqQwD3Jjh9Mx+lCr 5qnyBYNBM/6ehOT90o8qPc15Uvvm4RgbZ3jYiUtThQGF3fNLORAZ4ikNA4Rp6+mvUoc2aK YxFYJGYRxDICAT1+ySdjx0GrdFEMRXBNIbKJtAxTB2I6kehcCRAoMFNL8lROX8nktIT72W qI6WSf/HpwTiYPorm1aB+hIB3sKkWfsxjS4sgUCxNWFVulUwvZ7cgr0DQYIE8QE7CZSX6r JcpFRt0uBQ5nQAO9zK1yAQNFcB/zpC+PvA78v2qv4d/hpq8cHFaR0RrkSAF8+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730208856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W63SIOg5hLf6t46JHaqC0x+5HoByWlHphn1WBiTl3h0=; b=ULlpwxHa2g1z2ByL/jU7g6/ou3pbJoHf+dUovNalLRsPrrrA++y3j6tV41CwRt5l5ti1oJ 75HQF3u6S+1KrTlJ9JZeX2HUkIrpckDNSkqKYuzXiXj7B+/yOX9I6DG16+WBmAYzsQXcWz ucMHPKRFmtVa0/+nOyZjyLhv4ZlJ7sh8Qx6qn/okS1EKNcGJ6MfDp70aYDf04ugJEOPivM 7u2lcNHbG0KtLpfdFGcD6DS2FFh2DYKQivn+OJVC4PO8WshgIhaEqzpr4QRRngNbvhMXJ9 b2SQ7lNNhvrgdGvOAhm6ac1lqSlbQ/u3XzkqdWqiiAXo+kz4j0h3Rncfst/XzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730208856; a=rsa-sha256; cv=none; b=F3UxmrNw78KxsW/ECu2VgdhwQTk6Z69KHdmOFvolKwBsrtoHORAyXfdlIbJJ/eYBlQHDYN 71+bsSJtC//EdtoLfNqtWXU+dZfKJVuP+56BNv/YQyevP3oCH4jAsww2PInxP5APqqqXJ4 SdI8/2AvBumD1SRnYBxa5m54Y3Pk89RAZo2yKMpHqd92z8pjxQLEv440G1yoNhHFjKKmH6 F3DuOlnIuAfZ/spJd3kxh26grvQE1OtNeJ2xBNrG840hhac0sZjub5L7wqPMf8Xiu0+TrP Ta6nkcjdiHWfS46Qa0M2FU+Iiida58n4eVfo0Xncj/YAaE+zOg52NMfdjRiAZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XdB7D1XFdzQVg; Tue, 29 Oct 2024 13:34:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49TDYGYh035717; Tue, 29 Oct 2024 13:34:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49TDYGRO035714; Tue, 29 Oct 2024 13:34:16 GMT (envelope-from git) Date: Tue, 29 Oct 2024 13:34:16 GMT Message-Id: <202410291334.49TDYGRO035714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9b42b9863808 - stable/14 - vm_object: Report laundry pages in kinfo_vmobject List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b42b9863808791a24ed77e80c5d64ab47211019 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9b42b9863808791a24ed77e80c5d64ab47211019 commit 9b42b9863808791a24ed77e80c5d64ab47211019 Author: Mark Johnston AuthorDate: 2024-10-22 12:47:52 +0000 Commit: Mark Johnston CommitDate: 2024-10-29 13:04:25 +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 945a51f6c3de..7e4ab5bd914f 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -607,7 +607,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 d2ac8f696634..06dae7de3baa 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2583,10 +2583,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++; } }