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)
Dec 23 2023, 6:36 AM
Unknown Object (File)
Dec 14 2023, 8:38 PM
Unknown Object (File)
Aug 27 2023, 2:44 PM
Unknown Object (File)
Aug 16 2023, 9:18 AM
Unknown Object (File)
Aug 16 2023, 6:13 AM
Unknown Object (File)
Aug 13 2023, 6:41 AM
Unknown Object (File)
May 17 2023, 7:58 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.