Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166441185
D24592.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
D24592.diff
View Options
Index: head/sys/vm/vm_page.h
===================================================================
--- head/sys/vm/vm_page.h
+++ head/sys/vm/vm_page.h
@@ -958,8 +958,8 @@
*
* Perform a racy check to determine whether a reference prevents the page
* from being reclaimable. If the page's object is locked, and the page is
- * unmapped and unbusied or exclusively busied by the current thread, no
- * new wirings may be created.
+ * unmapped and exclusively busied by the current thread, no new wirings
+ * may be created.
*/
static inline bool
vm_page_wired(vm_page_t m)
Index: head/sys/vm/vm_page.c
===================================================================
--- head/sys/vm/vm_page.c
+++ head/sys/vm/vm_page.c
@@ -4165,7 +4165,16 @@
if ((flags & VPR_TRYFREE) != 0 &&
(m->object->ref_count == 0 || !pmap_page_is_mapped(m)) &&
m->dirty == 0 && vm_page_tryxbusy(m)) {
- vm_page_free(m);
+ /*
+ * An unlocked lookup may have wired the page before the
+ * busy lock was acquired, in which case the page must
+ * not be freed.
+ */
+ if (__predict_true(!vm_page_wired(m))) {
+ vm_page_free(m);
+ return;
+ }
+ vm_page_xunbusy(m);
} else {
vm_page_release_toq(m, PQ_INACTIVE, flags != 0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 14, 2:25 PM (15 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36734730
Default Alt Text
D24592.diff (1 KB)
Attached To
Mode
D24592: Re-check for wirings after busying the page in vm_page_release_locked().
Attached
Detach File
Event Timeline
Log In to Comment