Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F116018398
D34724.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
D34724.diff
View Options
diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c
--- a/sys/vm/vm_phys.c
+++ b/sys/vm/vm_phys.c
@@ -1405,9 +1405,9 @@
continue;
/*
- * Determine if a sufficient number of
- * subsequent blocks to satisfy the
- * allocation request are free.
+ * Determine if a series of free oind-blocks
+ * starting here can satisfy the allocation
+ * request.
*/
do {
pa += 1 <<
@@ -1416,6 +1416,23 @@
goto done;
} while (VM_NFREEORDER - 1 == seg->first_page[
atop(pa - seg->start)].order);
+
+ /*
+ * Determine if an additional series of free
+ * blocks of diminishing size can help to
+ * satisfy the allocation request.
+ */
+ for (;;) {
+ m = &seg->first_page[
+ atop(pa - seg->start)];
+ if (m->order == VM_NFREEORDER ||
+ pa + (2 << (PAGE_SHIFT + m->order))
+ <= pa_end)
+ break;
+ pa += 1 << (PAGE_SHIFT + m->order);
+ if (pa >= pa_end)
+ goto done;
+ }
}
}
}
@@ -1423,6 +1440,7 @@
done:
for (m = m_ret; m < &m_ret[npages]; m = &m[1 << oind]) {
fl = (*queues)[m->pool];
+ oind = m->order;
vm_freelist_rem(fl, m, oind);
if (m->pool != VM_FREEPOOL_DEFAULT)
vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 2, 4:38 PM (18 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17908091
Default Alt Text
D34724.diff (1 KB)
Attached To
Mode
D34724: Allow allocation of pages from beyond the last max order block of a range
Attached
Detach File
Event Timeline
Log In to Comment