From nobody Sun Jul 21 08:51:18 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 4WRcZv0fZsz5R4gV; Sun, 21 Jul 2024 08:51:19 +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 4WRcZt56y2z4lT8; Sun, 21 Jul 2024 08:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721551878; 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=/pJR9zZvv72CSjHnz2FrC2nexmUrz18Ml0c5k97at/A=; b=b4pA5jd78EhFnGMbJFX9zTkG/3Y/aXnk5M165DX/iDGaa9j/gf1iOErx8CVC520o7DoL1h cDwnu6JSAVQoVottYM1SjfyXa5Izn6UBM+ypyfDL/cJtr6Msi2ib3+zMQ4vv+bpfXCCNgX HfRdaKvZJLh+8FuM9U7zcvSjm3Iicz8wkUvmIXBkwblbKCjKXkXpQB6fSEOkU4ZPQUIrb4 PPEhw3gLxFE8Ij494Pzo+Qh1clhvQb9/GKHYzP8pw9rzQuse7+kV0IeL8chZn6MWKaZ7aO RiVnml/oS7AUrXp63blihy75Tumc3+e7sYL/CJUP+RgW9EbbhnPubE6zsyc9tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721551878; a=rsa-sha256; cv=none; b=TkuqnegTYD71fi8UU2kUr2MuvgpO6YhAZQAJ5Bg01uM/8OSu3c0kyTbCdLke7M/GWL5Tth VIZdZrJw41hTLxKsmJGV4b10vzt4Dm1CNitCNJ+zMk7Bith4YdIuraq8o/BO3IIyOKdzw5 vGLEksypx93WG8fG26dTVwPZhbsyRPNh0rg3qKQRbI1PDEe0ScovjBKjsO/NBfOyyaKLCP AIapJRk06g1qnhL51TnfbFn7/HgL0HlK+Ez4be38mFEnkAG9a+SdpN7R9xbrD1uZrMbQwq wnDMOg0aaijj9vKtroerr8YdfJAunFRqWPjliH4Uq8ipr7nOT8OVb/FGHPidsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721551878; 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=/pJR9zZvv72CSjHnz2FrC2nexmUrz18Ml0c5k97at/A=; b=NgAByDa0DRusStOKYabBwnXUe+5HlF0p5fS5EHvCShayfe6QBNAxnagyvp/GxF9EmiOeF3 wZ9En0vm4QyA8nGkd4+r0dw5gKD7fGo4ZdyMGFC05oZtWQV1HpO2wz2aXGSCVg5HsNV0P2 BJvNheeHzzZxdwIsqZ/YF+ynbUyyUfU/PoTUg9NQA1PyfC7IWpVUb0H+KYIEZSbDZnYRyB nkNRFuU+OuqDC8rFHpD/Fva0crdJj8DNPnfHHyndZ9fOXEZTK/u8ytJnuAr8EpAc+z35kC CufoF+HxAJzFpzmU7BF8gHmXNQY7IFTop3N9t95mrcsYw8yY2ZxwEgMu9njkTw== 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 4WRcZt4PxhztGf; Sun, 21 Jul 2024 08:51:18 +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 46L8pIk3071317; Sun, 21 Jul 2024 08:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46L8pIla071314; Sun, 21 Jul 2024 08:51:18 GMT (envelope-from git) Date: Sun, 21 Jul 2024 08:51:18 GMT Message-Id: <202407210851.46L8pIla071314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 049a256e9aa7 - stable/14 - vm_page: add vm_page_clearref() helper 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 049a256e9aa7b37487a6538d8c5763db6ec7a658 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=049a256e9aa7b37487a6538d8c5763db6ec7a658 commit 049a256e9aa7b37487a6538d8c5763db6ec7a658 Author: Konstantin Belousov AuthorDate: 2024-07-08 17:45:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-07-21 08:50:29 +0000 vm_page: add vm_page_clearref() helper (cherry picked from commit 45cde0e439188589ca2511f6fd76829cbf68267e) --- sys/vm/vm_page.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index c9773f27d195..a1df6f736aee 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -949,6 +949,17 @@ vm_page_in_laundry(vm_page_t m) return (queue == PQ_LAUNDRY || queue == PQ_UNSWAPPABLE); } +static inline void +vm_page_clearref(vm_page_t m) +{ + u_int r; + + r = m->ref_count; + while (atomic_fcmpset_int(&m->ref_count, &r, r & (VPRC_BLOCKED | + VPRC_OBJREF)) == 0) + ; +} + /* * vm_page_drop: *