Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151477502
D14184.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
D14184.diff
View Options
Index: head/sys/vm/vm_object.c
===================================================================
--- head/sys/vm/vm_object.c
+++ head/sys/vm/vm_object.c
@@ -2278,7 +2278,7 @@
vm_object_unwire(vm_object_t object, vm_ooffset_t offset, vm_size_t length,
uint8_t queue)
{
- vm_object_t tobject;
+ vm_object_t tobject, t1object;
vm_page_t m, tm;
vm_pindex_t end_pindex, pindex, tpindex;
int depth, locked_depth;
@@ -2292,6 +2292,7 @@
return;
pindex = OFF_TO_IDX(offset);
end_pindex = pindex + atop(length);
+again:
locked_depth = 1;
VM_OBJECT_RLOCK(object);
m = vm_page_find_least(object, pindex);
@@ -2325,16 +2326,26 @@
m = TAILQ_NEXT(m, listq);
}
vm_page_lock(tm);
+ if (vm_page_xbusied(tm)) {
+ for (tobject = object; locked_depth >= 1;
+ locked_depth--) {
+ t1object = tobject->backing_object;
+ VM_OBJECT_RUNLOCK(tobject);
+ tobject = t1object;
+ }
+ vm_page_busy_sleep(tm, "unwbo", true);
+ goto again;
+ }
vm_page_unwire(tm, queue);
vm_page_unlock(tm);
next_page:
pindex++;
}
/* Release the accumulated object locks. */
- for (depth = 0; depth < locked_depth; depth++) {
- tobject = object->backing_object;
- VM_OBJECT_RUNLOCK(object);
- object = tobject;
+ for (tobject = object; locked_depth >= 1; locked_depth--) {
+ t1object = tobject->backing_object;
+ VM_OBJECT_RUNLOCK(tobject);
+ tobject = t1object;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 4:30 PM (13 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31143664
Default Alt Text
D14184.diff (1 KB)
Attached To
Mode
D14184: On munlock(), unwire correct page.
Attached
Detach File
Event Timeline
Log In to Comment