Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142581379
D12134.id32438.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
D12134.id32438.diff
View Options
Index: vm/swap_pager.c
===================================================================
--- vm/swap_pager.c
+++ vm/swap_pager.c
@@ -1827,7 +1827,7 @@
int i;
bool empty;
- VM_OBJECT_ASSERT_LOCKED(object);
+ VM_OBJECT_ASSERT_WLOCKED(object);
if (object->type != OBJT_SWAP || count == 0)
return;
@@ -1909,9 +1909,13 @@
daddr_t r1;
int i;
- VM_OBJECT_ASSERT_LOCKED(object);
+ if ((flags & (SWM_FREE | SWM_POP)) != 0)
+ VM_OBJECT_ASSERT_WLOCKED(object);
+ else
+ VM_OBJECT_ASSERT_LOCKED(object);
+
/*
- * The meta data only exists of the object is OBJT_SWAP
+ * The meta data only exists if the object is OBJT_SWAP
* and even then might not be allocated yet.
*/
if (object->type != OBJT_SWAP)
Index: vm/vm_fault.c
===================================================================
--- vm/vm_fault.c
+++ vm/vm_fault.c
@@ -236,14 +236,15 @@
* written NOW so dirty it explicitly to save on
* pmap_is_modified() calls later.
*
- * Also tell the backing pager, if any, that it should remove
- * any swap backing since the page is now dirty.
+ * Also, since the page is now dirty, we can possibly tell
+ * the pager to release any swap backing the page. Calling
+ * the pager requires a write lock on the object.
*/
if (need_dirty)
vm_page_dirty(m);
if (!set_wd)
vm_page_unlock(m);
- if (need_dirty)
+ else if (need_dirty)
vm_pager_page_unswapped(m);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 22, 6:16 AM (34 m, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27831655
Default Alt Text
D12134.id32438.diff (1 KB)
Attached To
Mode
D12134: Update vm object lock assertions in the swap pager
Attached
Detach File
Event Timeline
Log In to Comment