Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107109737
D46943.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46943.diff
View Options
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -2097,7 +2097,7 @@
* Attempt to reserve the pages. Fail if we're below the limit.
*/
limit += npages;
- old = vmd->vmd_free_count;
+ old = atomic_load_int(&vmd->vmd_free_count);
do {
if (old < limit)
return (0);
@@ -4239,7 +4239,7 @@
{
u_int old;
- old = m->ref_count;
+ old = atomic_load_int(&m->ref_count);
do {
KASSERT(old > 0,
("vm_page_wire_mapped: wiring unreferenced page %p", m));
@@ -4273,7 +4273,7 @@
* Use a release store when updating the reference count to
* synchronize with vm_page_free_prep().
*/
- old = m->ref_count;
+ old = atomic_load_int(&m->ref_count);
do {
KASSERT(VPRC_WIRE_COUNT(old) > 0,
("vm_page_unwire: wire count underflow for page %p", m));
@@ -4568,7 +4568,7 @@
("vm_page_try_blocked_op: page %p is not busy", m));
VM_OBJECT_ASSERT_LOCKED(m->object);
- old = m->ref_count;
+ old = atomic_load_int(&m->ref_count);
do {
KASSERT(old != 0,
("vm_page_try_blocked_op: page %p has no references", m));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:25 AM (14 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15751332
Default Alt Text
D46943.diff (1 KB)
Attached To
Mode
D46943: vm_page: Use atomic loads for cmpset loops
Attached
Detach File
Event Timeline
Log In to Comment