MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zone_domain_lock

Function zone_domain_lock

freebsd/vm/uma_core.c:539–554  ·  view source on GitHub ↗

* Acquire the domain lock and record contention. */

Source from the content-addressed store, hash-verified

537 * Acquire the domain lock and record contention.
538 */
539static uma_zone_domain_t
540zone_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

Callers 3

zone_put_bucketFunction · 0.85
cache_fetch_bucketFunction · 0.85
uma_zalloc_domainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected