Date: Mon, 29 Nov 2021 14:21:03 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 1556ae13560c - stable/13 - vm_page: Remove vm_page_sbusy() and vm_page_xbusy() Message-ID: <202111291421.1ATEL3jh056002@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1556ae13560c18f44b5daed19608c547e0bf6e8a commit 1556ae13560c18f44b5daed19608c547e0bf6e8a Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-11-15 16:35:52 +0000 Commit: Mark Johnston <markj@FreeBSD.org> 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, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111291421.1ATEL3jh056002>