Page MenuHomeFreeBSD

D62391.1796412389.diff
No OneTemporary

Authored By
Unknown
Size
874 B
Referenced Files
None
Subscribers
None

D62391.1796412389.diff

Index: sys/vm/vm_page.c
===================================================================
--- sys/vm/vm_page.c
+++ sys/vm/vm_page.c
@@ -1043,7 +1043,12 @@
KASSERT(x != VPB_FREED,
("vm_page_sunbusy: Unlocking freed page."));
if (VPB_SHARERS(x) > 1) {
- if (atomic_fcmpset_int(&m->busy_lock, &x,
+ /*
+ * This sharer may have modified the page, and the
+ * next thread to busy the page exclusively must see
+ * those changes.
+ */
+ if (atomic_fcmpset_rel_int(&m->busy_lock, &x,
x - VPB_ONE_SHARER))
break;
continue;
@@ -1840,7 +1845,8 @@
if (x == VPB_FREED)
break;
if ((x & VPB_BIT_SHARED) != 0 && VPB_SHARERS(x) > 1) {
- if (atomic_fcmpset_int(&m->busy_lock, &x,
+ /* Release, as in vm_page_sunbusy(). */
+ if (atomic_fcmpset_rel_int(&m->busy_lock, &x,
x - VPB_ONE_SHARER))
break;
continue;

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 4, 7:26 PM (12 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42211911
Default Alt Text
D62391.1796412389.diff (874 B)

Event Timeline