* Acquire the domain lock and record contention. */
| 537 | * Acquire the domain lock and record contention. |
| 538 | */ |
| 539 | static uma_zone_domain_t |
| 540 | zone_domain_lock(uma_zone_t zone, int domain) |
| 541 | { |
| 542 | uma_zone_domain_t zdom; |
| 543 | bool lockfail; |
| 544 | |
| 545 | zdom = ZDOM_GET(zone, domain); |
| 546 | lockfail = false; |
| 547 | if (ZDOM_OWNED(zdom)) |
| 548 | lockfail = true; |
| 549 | ZDOM_LOCK(zdom); |
| 550 | /* This is unsynchronized. The counter does not need to be precise. */ |
| 551 | if (lockfail && zone->uz_bucket_size < zone->uz_bucket_size_max) |
| 552 | zone->uz_bucket_size++; |
| 553 | return (zdom); |
| 554 | } |
| 555 | |
| 556 | /* |
| 557 | * Search for the domain with the least cached items and return it if it |
no outgoing calls
no test coverage detected