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)
Sat, Nov 23, 10:28 AM
Unknown Object (File)
Mon, Nov 18, 9:44 AM
Unknown Object (File)
Mon, Nov 18, 2:44 AM
Unknown Object (File)
Mon, Nov 18, 2:27 AM
Unknown Object (File)
Mon, Nov 18, 2:24 AM
Unknown Object (File)
Mon, Nov 18, 12:27 AM
Unknown Object (File)
Nov 8 2024, 3:50 PM
Unknown Object (File)
Oct 2 2024, 6:42 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.