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

Function zone_free_bucket

freebsd/vm/uma_core.c:4368–4397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4366#endif
4367
4368static void
4369zone_free_bucket(uma_zone_t zone, uma_bucket_t bucket, void *udata,
4370 int itemdomain, bool ws)
4371{
4372
4373#ifdef NUMA
4374 /*
4375 * Buckets coming from the wrong domain will be entirely for the
4376 * only other domain on two domain systems. In this case we can
4377 * simply cache them. Otherwise we need to sort them back to
4378 * correct domains.
4379 */
4380 if ((zone->uz_flags & UMA_ZONE_FIRSTTOUCH) != 0 &&
4381 vm_ndomains > 2 && PCPU_GET(domain) != itemdomain) {
4382 zone_free_cross(zone, bucket, udata);
4383 return;
4384 }
4385#endif
4386
4387 /*
4388 * Attempt to save the bucket in the zone's domain bucket cache.
4389 */
4390 CTR3(KTR_UMA,
4391 "uma_zfree: zone %s(%p) putting bucket %p on free list",
4392 zone->uz_name, zone, bucket);
4393 /* ub_cnt is pointing to the last free item */
4394 if ((zone->uz_flags & UMA_ZONE_ROUNDROBIN) != 0)
4395 itemdomain = zone_domain_lowest(zone, itemdomain);
4396 zone_put_bucket(zone, itemdomain, bucket, udata, ws);
4397}
4398
4399/*
4400 * Populate a free or cross bucket for the current cpu cache. Free any

Callers 2

cache_drain_safe_cpuFunction · 0.85
cache_freeFunction · 0.85

Calls 3

zone_free_crossFunction · 0.85
zone_domain_lowestFunction · 0.85
zone_put_bucketFunction · 0.85

Tested by

no test coverage detected