From nobody Mon Nov 29 14:21:03 2021 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 13F4F18B0405; Mon, 29 Nov 2021 14:21:06 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2nZm4fYsz3h0Y; Mon, 29 Nov 2021 14:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 027DF23AF4; Mon, 29 Nov 2021 14:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ATEL3Nn056003; Mon, 29 Nov 2021 14:21:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATEL3jh056002; Mon, 29 Nov 2021 14:21:03 GMT (envelope-from git) Date: Mon, 29 Nov 2021 14:21:03 GMT Message-Id: <202111291421.1ATEL3jh056002@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: 1556ae13560c - stable/13 - vm_page: Remove vm_page_sbusy() and vm_page_xbusy() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 1556ae13560c18f44b5daed19608c547e0bf6e8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638195664; 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=x2ew3SVGT7UXBL146X2WbS8mbC/orGkVDQcNdC+SUjg=; b=uB2WCETULUecgnUQ9uLyC3pZCLWuXOxPv8uoBLSjzP1ybnPTMlq3I5RAp0btX1cPjaMcPa /dZgoKBJRUDGTAq6GL/DNEopt5CCi0XwAEi+3pApakglPyw7uJes3cyLmUiWvcUKd5QEMv uXwafJqekQuUVswrKkUoswx17MZjiS2tPxxC47F96xEcGm6OoYchMiru5V5g4+btQuGSr+ 6oPNSNJVEymvq6TkUnWoGdfWZfp6ZrNfVyFIGJQvfl4gip9SbsYKPKKupUb6bl6KtNKucA 8BKbWLNkleQ8LM3ctZ9UXptihupVUVARoRT2iuPrCMzp5bSFArUuhkQ0R8Aq1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638195664; a=rsa-sha256; cv=none; b=sEt+aMMrYrSxHDDVURrD2wbpFDFvZY8yqLg84sXn6xYnvsl2zAOYOzAkxXvq69MlIoNzhp IFKEj14eWSto8q4XSdCWIx+bp84VkYAGTvBzYR8mCqDnR2eCqa085nHm1g34fFR2pN7orF 2u0th315sTzHPU6sjrfCsn+eagv1Z1F1M3xhiY9MtgEWwzJ6VrvCAgkDD90Rg44KtSKjea jtaZSgcQX/JbXcv22stC3hbx9vIdgIaWQ8rjsq56vIuBBGjbwKaGCa46gpgPLq5v1oWtFr VJSJVIw6A5YLls8QGl1w04je1xOmjR+RwpkTZbpXjq6Yq2mXBC7yBF8YAJiPVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1556ae13560c18f44b5daed19608c547e0bf6e8a commit 1556ae13560c18f44b5daed19608c547e0bf6e8a Author: Mark Johnston AuthorDate: 2021-11-15 16:35:52 +0000 Commit: Mark Johnston CommitDate: 2021-11-29 14:11:37 +0000 vm_page: Remove vm_page_sbusy() and vm_page_xbusy() They are unused today and cannot be safely used in the face of unlocked lookup, in which pages may be busied without the object lock held. Obtained from: jeff (object_concurrency patches) Reviewed by: kib (cherry picked from commit a2665158d03e87dad410384e5c61c72e675f3edd) --- ObsoleteFiles.inc | 4 +++- share/man/man9/Makefile | 2 -- share/man/man9/vm_page_busy.9 | 16 ---------------- sys/vm/vm_page.h | 12 ------------ 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 1448b9076c95..9e6b7b987d79 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,7 +36,9 @@ # xargs -n1 | sort | uniq -d; # done -# 20211115: vm_page_sleep_if_busy removed +# 20211115: vm_page busy functions removed +OLD_FILES+=share/man/man9/vm_page_sbusy.9.gz +OLD_FILES+=share/man/man9/vm_page_xbusy.9.gz OLD_FILES+=share/man/man9/vm_page_sleep_if_busy.9.gz # 20210923: rename boot(9) to kern_reboot(9) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 14cdf7470b41..f6eced940295 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2325,12 +2325,10 @@ MLINKS+=vm_page_busy.9 vm_page_busied.9 \ vm_page_busy.9 vm_page_busy_downgrade.9 \ vm_page_busy.9 vm_page_busy_sleep.9 \ vm_page_busy.9 vm_page_sbusied.9 \ - vm_page_busy.9 vm_page_sbusy.9 \ vm_page_busy.9 vm_page_sunbusy.9 \ vm_page_busy.9 vm_page_trysbusy.9 \ vm_page_busy.9 vm_page_tryxbusy.9 \ vm_page_busy.9 vm_page_xbusied.9 \ - vm_page_busy.9 vm_page_xbusy.9 \ vm_page_busy.9 vm_page_xunbusy.9 \ vm_page_busy.9 vm_page_assert_sbusied.9 \ vm_page_busy.9 vm_page_assert_unbusied.9 \ diff --git a/share/man/man9/vm_page_busy.9 b/share/man/man9/vm_page_busy.9 index 3f08a467bcb1..88511aafabca 100644 --- a/share/man/man9/vm_page_busy.9 +++ b/share/man/man9/vm_page_busy.9 @@ -32,12 +32,10 @@ .Nm vm_page_busy_downgrade , .Nm vm_page_busy_sleep , .Nm vm_page_sbusied , -.Nm vm_page_sbusy , .Nm vm_page_sunbusy , .Nm vm_page_trysbusy , .Nm vm_page_tryxbusy , .Nm vm_page_xbusied , -.Nm vm_page_xbusy , .Nm vm_page_xunbusy , .Nm vm_page_assert_sbusied , .Nm vm_page_assert_unbusied , @@ -56,8 +54,6 @@ .Ft int .Fn vm_page_sbusied "vm_page_t m" .Ft void -.Fn vm_page_sbusy "vm_page_t m" -.Ft void .Fn vm_page_sunbusy "vm_page_t m" .Ft int .Fn vm_page_trysbusy "vm_page_t m" @@ -66,8 +62,6 @@ .Ft int .Fn vm_page_xbusied "vm_page_t m" .Ft void -.Fn vm_page_xbusy "vm_page_t m" -.Ft void .Fn vm_page_xunbusy "vm_page_t m" .Pp .Cd "options INVARIANTS" @@ -140,11 +134,6 @@ in shared mode. Returns zero otherwise. .Pp The -.Fn vm_page_sbusy -function shared busies -.Fa m . -.Pp -The .Fn vm_page_sunbusy function shared unbusies .Fa m . @@ -173,11 +162,6 @@ in exclusive mode. Returns zero otherwise. .Pp The -.Fn vm_page_xbusy -function exclusive busies -.Fa m . -.Pp -The .Fn vm_page_xunbusy function exclusive unbusies .Fa m . diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 4b43b1d71f54..1785728b7a7e 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -748,24 +748,12 @@ void vm_page_lock_assert_KBI(vm_page_t m, int a, const char *file, int line); #define vm_page_busied(m) \ (vm_page_busy_fetch(m) != VPB_UNBUSIED) -#define vm_page_sbusy(m) do { \ - if (!vm_page_trysbusy(m)) \ - panic("%s: page %p failed shared busying", __func__, \ - (m)); \ -} while (0) - #define vm_page_xbusied(m) \ ((vm_page_busy_fetch(m) & VPB_SINGLE_EXCLUSIVE) != 0) #define vm_page_busy_freed(m) \ (vm_page_busy_fetch(m) == VPB_FREED) -#define vm_page_xbusy(m) do { \ - if (!vm_page_tryxbusy(m)) \ - panic("%s: page %p failed exclusive busying", __func__, \ - (m)); \ -} while (0) - /* Note: page m's lock must not be owned by the caller. */ #define vm_page_xunbusy(m) do { \ if (!atomic_cmpset_rel_int(&(m)->busy_lock, \