Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153086772
D26771.id78193.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
787 B
Referenced Files
None
Subscribers
None
D26771.id78193.diff
View Options
Index: sys/vm/uma_core.c
===================================================================
--- sys/vm/uma_core.c
+++ sys/vm/uma_core.c
@@ -3733,7 +3733,7 @@
stripe = howmany(max, vm_ndomains);
#endif
dom = &keg->uk_domain[slab->us_domain];
- while (slab->us_freecount && i < max) {
+ do {
bucket[i++] = slab_alloc_item(keg, slab);
if (dom->ud_free_items <= keg->uk_reserve)
break;
@@ -3750,8 +3750,13 @@
vm_ndomains > 1 && --stripe == 0)
break;
#endif
- }
+ } while (slab->us_freecount != 0 && i < max);
KEG_UNLOCK(keg, slab->us_domain);
+
+ /* Don't deplete reserves more than necessary. */
+ if ((flags & M_USE_RESERVE) != 0)
+ break;
+
/* Don't block if we allocated any successfully. */
flags &= ~M_WAITOK;
flags |= M_NOWAIT;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 1:26 AM (7 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31813930
Default Alt Text
D26771.id78193.diff (787 B)
Attached To
Mode
D26771: uma: Avoid depleting keg reserves when filling a bucket
Attached
Detach File
Event Timeline
Log In to Comment