Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144269408
D25950.id75390.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
D25950.id75390.diff
View Options
Index: sys/vm/uma_core.c
===================================================================
--- sys/vm/uma_core.c
+++ sys/vm/uma_core.c
@@ -3327,22 +3327,33 @@
{
uma_cache_bucket_t bucket;
uma_cache_t cache;
+ smr_seq_t seq;
+ void *item;
+ bool ok;
#ifdef UMA_ZALLOC_DEBUG
- void *item;
-
KASSERT((zone->uz_flags & UMA_ZONE_SMR) != 0,
("uma_zalloc_arg: called with non-SMR zone.\n"));
if (uma_zalloc_debug(zone, &item, NULL, flags) == EJUSTRETURN)
return (item);
#endif
- critical_enter();
- cache = &zone->uz_cpu[curcpu];
- bucket = &cache->uc_allocbucket;
- if (__predict_false(bucket->ucb_cnt == 0))
- return (cache_alloc_retry(zone, cache, NULL, flags));
- return (cache_alloc_item(zone, cache, bucket, NULL, flags));
+ for (;;) {
+ critical_enter();
+ cache = &zone->uz_cpu[curcpu];
+ bucket = &cache->uc_allocbucket;
+ if (__predict_false(bucket->ucb_cnt == 0))
+ item = cache_alloc_retry(zone, cache, NULL, flags);
+ else
+ item = cache_alloc_item(zone, cache, bucket, NULL, flags);
+ if (__predict_true(item != NULL))
+ return (item);
+
+ seq = smr_advance(zone->uz_smr);
+ ok = smr_poll(zone->uz_smr, seq, true /* block */);
+ KASSERT(ok, ("%s: blocking smr_poll failed", __func__));
+ (void)ok;
+ }
}
/* See uma.h */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 9:20 AM (20 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28468726
Default Alt Text
D25950.id75390.diff (1 KB)
Attached To
Mode
D25950: buf_trie_alloc: Spin on alloc failure
Attached
Detach File
Event Timeline
Log In to Comment