Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137959100
D25355.id73312.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
D25355.id73312.diff
View Options
Index: sys/vm/uma_core.c
===================================================================
--- sys/vm/uma_core.c
+++ sys/vm/uma_core.c
@@ -3398,7 +3398,7 @@
cache_alloc(uma_zone_t zone, uma_cache_t cache, void *udata, int flags)
{
uma_bucket_t bucket;
- int domain;
+ int curdomain, domain;
bool new;
CRITICAL_ASSERT(curthread);
@@ -3445,7 +3445,8 @@
* the critical section.
*/
domain = PCPU_GET(domain);
- if ((cache_uz_flags(cache) & UMA_ZONE_ROUNDROBIN) != 0)
+ if ((cache_uz_flags(cache) & UMA_ZONE_ROUNDROBIN) != 0 ||
+ VM_DOMAIN_EMPTY(domain))
domain = zone_domain_highest(zone, domain);
bucket = cache_fetch_bucket(zone, cache, domain);
if (bucket == NULL) {
@@ -3470,7 +3471,8 @@
cache = &zone->uz_cpu[curcpu];
if (cache->uc_allocbucket.ucb_bucket == NULL &&
((cache_uz_flags(cache) & UMA_ZONE_FIRSTTOUCH) == 0 ||
- domain == PCPU_GET(domain))) {
+ (curdomain = PCPU_GET(domain)) == domain ||
+ VM_DOMAIN_EMPTY(curdomain))) {
if (new)
atomic_add_long(&ZDOM_GET(zone, domain)->uzd_imax,
bucket->ub_cnt);
@@ -3877,7 +3879,7 @@
/* Avoid allocs targeting empty domains. */
if (domain != UMA_ANYDOMAIN && VM_DOMAIN_EMPTY(domain))
domain = UMA_ANYDOMAIN;
- if ((zone->uz_flags & UMA_ZONE_ROUNDROBIN) != 0)
+ else if ((zone->uz_flags & UMA_ZONE_ROUNDROBIN) != 0)
domain = UMA_ANYDOMAIN;
if (zone->uz_max_items > 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 4:58 PM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26289998
Default Alt Text
D25355.id73312.diff (1 KB)
Attached To
Mode
D25355: Fix UMA's first-touch policy with empty domains.
Attached
Detach File
Event Timeline
Log In to Comment