From nobody Fri Sep 27 17:34:47 2024 X-Original-To: dev-commits-src-all@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 4XFczW6PNCz5YFMY; Fri, 27 Sep 2024 17:34:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XFczW4dfVz4CQ5; Fri, 27 Sep 2024 17:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458487; 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=WknBvgrPw7BjbR/AksYapUs5yZiEMbIR48XIHzF2VzA=; b=jGZAivPmo26HO+TnZitE5oTga4Alk6CvvpFr1atkZkf+Lt4BAEuorofEHM245X1jhW1knY 5bnFF48W9ECka+8LKb8ilRqCQ79dGK0L+LhcEk/9AxwGSxQjcM0StSQ6fw49BGE85ip+fK 1BqiYtwAnNWkALrN/Eqx4Fxz3OCriGHcEy6l8ycrcT0PrkheyUByaO01IUc/z3Lcy0QnNf CAght1KygRjN2J+8o13kOmgyV+q99Tl1VO/UzAMV6wVX1n814f4K+FdbG62u4V65AidLwD hEQDmNBTvb9cDjWw15moVkGDEgS3a2unF9HH/qDVIkhVDLnmu0azwku+LedsUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458487; 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=WknBvgrPw7BjbR/AksYapUs5yZiEMbIR48XIHzF2VzA=; b=ByUjbOBIfftcDs1b80Y+3hEAvNrLDa3285RyQaCHzgaRCmZVm/BbYIGesBsz1VKW9Igi7E 0/WFTap27owFNlmbF/kVcT7zryrgG5f3i37x192S/HdxVKkALTwifl1PMPcKP6Wo3BqTOM UARH6hHH8Vm080LJ6HUQ0T+8u4/7erbFzMi4x/oJfguMRcK/rp6kJBMuM6Tm2kyok+i6b7 oHHp3k00AJnvKPcl+l8EyVVVDlNGEQLWN7Pvq8uvjKd9JE9kvQgi7Rl0koSpErf1Bn7d/G b92SRO3m5wUGaxokdjTTL3G1TbKXsF59Fi5D1rtWA0WvBEfEQIrNuZ6/9C/+0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458487; a=rsa-sha256; cv=none; b=w9cD2z4lsMd9HrcAEWh+TqGDL8MpgzjVJN8x28Cj6oQYpPgqCgdnpGrFvFJ2XA/eKb7Dtt tq84g0jVtpWUn8VL5m4IXjnfIzr0LdUfjCTwTePj0vlUfgLwNwyNaLGifg/imVvwwgJ0zP L51u5pdj/P0oQEDDVyyi+3iaQUQeddmsPar/cQuV7JezwhicfLJTyTonPPKR65ZCTj4FI+ ku/SImQw8ugd0qXTzhQyrTwTgHGzu5TqduJEj5mEqyHumi0k9AuBn8gR9SI3RYcW9Gw6HX Pw+v/thFXILzA7N5t7RKLq52VNYb287+cWf5nzE12vPGvUR8KchVR7rIf6whUg== 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 4XFczW4FyszqDH; Fri, 27 Sep 2024 17:34:47 +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 48RHYlRj062776; Fri, 27 Sep 2024 17:34:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYlsR062772; Fri, 27 Sep 2024 17:34:47 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:47 GMT Message-Id: <202409271734.48RHYlsR062772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1784fb44498d - main - vm_page_free_pages_toq(): return the count of freed pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1784fb44498da8007fb8cd8ee5060894eb5fe1e6 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1784fb44498da8007fb8cd8ee5060894eb5fe1e6 commit 1784fb44498da8007fb8cd8ee5060894eb5fe1e6 Author: Konstantin Belousov AuthorDate: 2024-09-27 16:20:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 vm_page_free_pages_toq(): return the count of freed pages Reviewed by: bnovkov Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46820 --- sys/vm/vm_page.c | 5 +++-- sys/vm/vm_page.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 40108e8a9b0a..6256472e0336 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -4177,14 +4177,14 @@ vm_page_free_toq(vm_page_t m) * from any VM object. In other words, this is equivalent to * calling vm_page_free_toq() for each page of a list of VM objects. */ -void +int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) { vm_page_t m; int count; if (SLIST_EMPTY(free)) - return; + return (0); count = 0; while ((m = SLIST_FIRST(free)) != NULL) { @@ -4195,6 +4195,7 @@ vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) if (update_wire_count) vm_wire_sub(count); + return (count); } /* diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index a69155e50723..c7c1ec3872a8 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -710,7 +710,7 @@ int vm_page_is_valid(vm_page_t, int, int); void vm_page_test_dirty(vm_page_t); vm_page_bits_t vm_page_bits(int base, int size); void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); -void vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); +int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); void vm_page_dirty_KBI(vm_page_t m); void vm_page_lock_KBI(vm_page_t m, const char *file, int line);