git: a2665158d03e - main - vm_page: Remove vm_page_sbusy() and vm_page_xbusy()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Nov 2021 18:03:00 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2665158d03e87dad410384e5c61c72e675f3edd commit a2665158d03e87dad410384e5c61c72e675f3edd Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-11-15 16:35:52 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-11-15 18:01:30 +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 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D32948 --- 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 a5ca6b8542a1..00cfe2a33129 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -40,7 +40,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 # 20211113: new clang import which bumps version from 12.0.1 to 13.0.0. diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b22dd2dff262..2bb45e3a6dc8 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2353,12 +2353,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 7adeaa7ddbe2..7183e0577bba 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -755,24 +755,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, \