]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
When destroying a UMA zone which has a reserve (set with
authorjtl <jtl@FreeBSD.org>
Tue, 10 Nov 2020 18:12:09 +0000 (18:12 +0000)
committerjtl <jtl@FreeBSD.org>
Tue, 10 Nov 2020 18:12:09 +0000 (18:12 +0000)
commit4b9ad438df9822bd12fc1f1c0bc2926fbca36caf
treee7c6b91f36fd673f3e6fc46ec21d6a510ecee326
parent2c214ef5192da8b1b25383e5cdc7047e97b97a79
When destroying a UMA zone which has a reserve (set with
uma_zone_reserve()), messages like the following appear on the console:
"Freed UMA keg (Test zone) was not empty (0 items). Lost 528 pages of
memory."

When keg_drain_domain() is draining the zone, it tries to keep the number
of items specified in the reservation. However, when we are destroying the
UMA zone, we do not need to keep those items. Therefore, when destroying a
non-secondary and non-cache zone, we should reset the keg reservation to 0
prior to draining the zone.

Reviewed by: markj
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D27129
sys/vm/uma_core.c