No memory barrier is required. This was pointed out by kib@ a while ago,

but I got distracted by other matters.

(for real this time)
This commit is contained in:
des 2012-09-04 22:19:33 +00:00
parent b490e053cd
commit 3ed9c078db

View File

@ -1848,7 +1848,7 @@ swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk)
mtx_unlock(&swhash_mtx);
VM_OBJECT_UNLOCK(object);
if (uma_zone_exhausted(swap_zone)) {
if (atomic_cmpset_rel_int(&exhausted, 0, 1))
if (atomic_cmpset_int(&exhausted, 0, 1))
printf("swap zone exhausted, "
"increase kern.maxswzone\n");
vm_pageout_oom(VM_OOM_SWAPZ);
@ -1859,7 +1859,7 @@ swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk)
goto retry;
}
if (atomic_cmpset_rel_int(&exhausted, 1, 0))
if (atomic_cmpset_int(&exhausted, 1, 0))
printf("swap zone ok\n");
swap->swb_hnext = NULL;