| 3380 | } |
| 3381 | |
| 3382 | static __noinline void * |
| 3383 | cache_alloc_retry(uma_zone_t zone, uma_cache_t cache, void *udata, int flags) |
| 3384 | { |
| 3385 | uma_cache_bucket_t bucket; |
| 3386 | int domain; |
| 3387 | |
| 3388 | while (cache_alloc(zone, cache, udata, flags)) { |
| 3389 | cache = &zone->uz_cpu[curcpu]; |
| 3390 | bucket = &cache->uc_allocbucket; |
| 3391 | if (__predict_false(bucket->ucb_cnt == 0)) |
| 3392 | continue; |
| 3393 | return (cache_alloc_item(zone, cache, bucket, udata, flags)); |
| 3394 | } |
| 3395 | critical_exit(); |
| 3396 | |
| 3397 | /* |
| 3398 | * We can not get a bucket so try to return a single item. |
| 3399 | */ |
| 3400 | if (zone->uz_flags & UMA_ZONE_FIRSTTOUCH) |
| 3401 | domain = PCPU_GET(domain); |
| 3402 | else |
| 3403 | domain = UMA_ANYDOMAIN; |
| 3404 | return (zone_alloc_item(zone, udata, domain, flags)); |
| 3405 | } |
| 3406 | |
| 3407 | /* See uma.h */ |
| 3408 | void * |
no test coverage detected