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
This commit is contained in:
parent
87b646630c
commit
a2665158d0
@ -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.
|
||||
|
@ -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 \
|
||||
|
@ -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 .
|
||||
|
@ -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, \
|
||||
|
Loading…
Reference in New Issue
Block a user