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

Function cache_fetch_bucket

freebsd/vm/uma_core.c:883–909  ·  view source on GitHub ↗

* Attempt to fetch a bucket from a zone on behalf of the current cpu cache. */

Source from the content-addressed store, hash-verified

881 * Attempt to fetch a bucket from a zone on behalf of the current cpu cache.
882 */
883static uma_bucket_t
884cache_fetch_bucket(uma_zone_t zone, uma_cache_t cache, int domain)
885{
886 uma_zone_domain_t zdom;
887 uma_bucket_t bucket;
888
889 /*
890 * Avoid the lock if possible.
891 */
892 zdom = ZDOM_GET(zone, domain);
893 if (zdom->uzd_nitems == 0)
894 return (NULL);
895
896 if ((cache_uz_flags(cache) & UMA_ZONE_SMR) != 0 &&
897 !smr_poll(zone->uz_smr, zdom->uzd_seq, false))
898 return (NULL);
899
900 /*
901 * Check the zone's cache of buckets.
902 */
903 zdom = zone_domain_lock(zone, domain);
904 if ((bucket = zone_fetch_bucket(zone, zdom, false)) != NULL)
905 return (bucket);
906 ZDOM_UNLOCK(zdom);
907
908 return (NULL);
909}
910
911static void
912zone_log_warning(uma_zone_t zone)

Callers 1

cache_allocFunction · 0.85

Calls 4

smr_pollFunction · 0.85
zone_domain_lockFunction · 0.85
zone_fetch_bucketFunction · 0.85
cache_uz_flagsFunction · 0.70

Tested by

no test coverage detected