Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146292888
D28924.id84686.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
751 B
Referenced Files
None
Subscribers
None
D28924.id84686.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D28924: vm: Round up npages and alignment for contig reclamation
Attached
Detach File
Event Timeline
Log In to Comment