* Attempt to fetch a bucket from a zone on behalf of the current cpu cache. */
| 881 | * Attempt to fetch a bucket from a zone on behalf of the current cpu cache. |
| 882 | */ |
| 883 | static uma_bucket_t |
| 884 | cache_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 | |
| 911 | static void |
| 912 | zone_log_warning(uma_zone_t zone) |
no test coverage detected