Page MenuHomeFreeBSD

D28924.id84686.diff
No OneTemporary

D28924.id84686.diff

Index: sys/vm/vm_page.c
===================================================================
--- sys/vm/vm_page.c
+++ sys/vm/vm_page.c
@@ -2997,6 +2997,16 @@
(count < npages && req_class == VM_ALLOC_INTERRUPT))
return (false);
+ /*
+ * The caller will attempt an allocation after some runs have been
+ * reclaimed and added to the vm_phys buddy lists. To ensure that runs
+ * are not fragmented, round up the requested length to the next power
+ * of 2 and ensure that each run is self-aligned.
+ */
+ npages = 1 << flsl(npages - 1);
+ if (alignment < ptoa(npages))
+ alignment = ptoa(npages);
+
/*
* Scan up to three times, relaxing the restrictions ("options") on
* the reclamation of reservations and superpages each time.

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 2, 11:46 AM (17 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29155973
Default Alt Text
D28924.id84686.diff (751 B)

Event Timeline