diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 9a7487fb3c870..6779cd01c6fad 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1448,22 +1448,20 @@ cache_drain_safe_cpu(uma_zone_t zone, void *unused) cache = &zone->uz_cpu[curcpu]; domain = PCPU_GET(domain); b1 = cache_bucket_unload_alloc(cache); - - /* - * Don't flush SMR zone buckets. This leaves the zone without a - * bucket and forces every free to synchronize(). - */ - if ((zone->uz_flags & UMA_ZONE_SMR) == 0) { - b2 = cache_bucket_unload_free(cache); - b3 = cache_bucket_unload_cross(cache); - } + b2 = cache_bucket_unload_free(cache); + b3 = cache_bucket_unload_cross(cache); critical_exit(); if (b1 != NULL) zone_free_bucket(zone, b1, NULL, domain, false); - if (b2 != NULL) + if (b2 != NULL) { + if ((zone->uz_flags & UMA_ZONE_SMR) != 0) + b2->ub_seq = smr_advance(zone->uz_smr); zone_free_bucket(zone, b2, NULL, domain, false); + } if (b3 != NULL) { + if ((zone->uz_flags & UMA_ZONE_SMR) != 0) + b3->ub_seq = smr_advance(zone->uz_smr); /* Adjust the domain so it goes to zone_free_cross. */ domain = (domain + 1) % vm_ndomains; zone_free_bucket(zone, b3, NULL, domain, false);