Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167554483
D8628.id22483.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
D8628.id22483.diff
View Options
Index: vm/vm_page.c
===================================================================
--- vm/vm_page.c
+++ vm/vm_page.c
@@ -1512,11 +1512,10 @@
}
/*
- * The page allocation request can came from consumers which already
- * hold the free page queue mutex, like vm_page_insert() in
- * vm_page_cache().
+ * Allocate a page if the number of free pages exceeds the minimum
+ * for the request class.
*/
- mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE);
+ mtx_lock(&vm_page_queue_free_mtx);
if (vm_cnt.v_free_count > vm_cnt.v_free_reserved ||
(req_class == VM_ALLOC_SYSTEM &&
vm_cnt.v_free_count > vm_cnt.v_interrupt_free_min) ||
@@ -1523,8 +1522,7 @@
(req_class == VM_ALLOC_INTERRUPT &&
vm_cnt.v_free_count > 0)) {
/*
- * Allocate from the free queue if the number of free pages
- * exceeds the minimum for the request class.
+ * Can we allocate the page from a reservation?
*/
#if VM_NRESERVLEVEL > 0
if (object == NULL || (object->flags & (OBJ_COLORED |
@@ -1532,6 +1530,9 @@
vm_reserv_alloc_page(object, pindex, mpred)) == NULL)
#endif
{
+ /*
+ * If not, allocate it from the free page queues.
+ */
m = vm_phys_alloc_pages(object != NULL ?
VM_FREEPOOL_DEFAULT : VM_FREEPOOL_DIRECT, 0);
#if VM_NRESERVLEVEL > 0
@@ -1841,7 +1842,7 @@
/*
* Do not allocate reserved pages unless the req has asked for it.
*/
- mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE);
+ mtx_lock(&vm_page_queue_free_mtx);
if (vm_cnt.v_free_count > vm_cnt.v_free_reserved ||
(req_class == VM_ALLOC_SYSTEM &&
vm_cnt.v_free_count > vm_cnt.v_interrupt_free_min) ||
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 23, 3:50 PM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37150700
Default Alt Text
D8628.id22483.diff (1 KB)
Attached To
Mode
D8628: Disallow recursion on the free page queue mutex
Attached
Detach File
Event Timeline
Log In to Comment