Page MenuHomeFreeBSD

Drain a keg of a UMA_ZONE_NOFREE zone when it is destroyed.
AbandonedPublic

Authored by glebius on Oct 1 2021, 1:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 2 2024, 6:42 PM
Unknown Object (File)
Oct 1 2024, 5:37 PM
Unknown Object (File)
Sep 21 2024, 4:50 AM
Unknown Object (File)
Sep 17 2024, 8:20 PM
Unknown Object (File)
Sep 10 2024, 9:06 PM
Unknown Object (File)
Sep 4 2024, 5:41 AM
Unknown Object (File)
Aug 5 2024, 5:42 PM
Unknown Object (File)
May 4 2024, 7:20 PM
Subscribers

Details

Reviewers
markj
jeff
Summary

Looks like my (Jonathan's) change to GELI created a precedent
when an UMA_ZONE_NOFREE is being destroyed. Without this change
we are leaking zero items, but leaking pages:

Freed UMA keg (GELI buffers) was not empty (0 items). Lost 528 pages of memory.

Fixes: 2dbc9a388ee
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258787

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41872
Build 38760: arc lint + arc unit

Event Timeline

From my reading, GELI sets _NOFREE to ensure that the reserve is not drained during a memory shortage. But UMA should not have done this in the first place, and it was fixed in commit f09cbea31a3ffc03361687cb39f264b6c8775212 . So does GELI still need to specify _NOFREE? If not, then my preferred solution is to drop the _NOFREE flag there. We should try hard to avoid adding new _NOFREE zones in general.

From my reading, GELI sets _NOFREE to ensure that the reserve is not drained during a memory shortage. But UMA should not have done this in the first place, and it was fixed in commit f09cbea31a3ffc03361687cb39f264b6c8775212 . So does GELI still need to specify _NOFREE? If not, then my preferred solution is to drop the _NOFREE flag there. We should try hard to avoid adding new _NOFREE zones in general.

I believe you are 100% right. This flag we were carrying in our tree from the times that predate your fix.

The problem will be addressed differently.