Page MenuHomeFreeBSD

racct: Add new "persistent" property for resources
AcceptedPublic

Authored by cyril_freebsdfoundation.org on Jun 15 2021, 7:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 12 2024, 11:26 AM
Unknown Object (File)
Oct 4 2024, 5:30 AM
Unknown Object (File)
Oct 3 2024, 5:06 PM
Unknown Object (File)
Oct 3 2024, 10:26 AM
Unknown Object (File)
Oct 1 2024, 2:03 PM
Unknown Object (File)
Oct 1 2024, 11:40 AM
Unknown Object (File)
Sep 28 2024, 4:08 AM
Unknown Object (File)
Sep 27 2024, 3:16 PM
Subscribers

Details

Reviewers
markj
trasz
Summary

This adds a new "persistent" property that describes resources which can drop in usage but do not automatically get reclaimed when a process dies. They must instead be manually dropped. This correctly handles shared resources such as shared memory. Previously, shared memory resources would be automatically dropped when a process died and then dropped again whenever the shared memory object was closed, leading to incorrect accounting.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

What's the difference between this and RESOURCE_SLOPPY?

What's the difference between this and RESOURCE_SLOPPY?

The main difference is that RACCT_IS_SLOPPY is not in RACCT_CAN_DROP. An alternate solution could be to add RACCT_SLOPPY to RACCT_CAN_DROP and remove RACCT_RECLAIMABLE from RACCT_NSHM and RACCT_SHMSIZE.

I wonder, should it perhaps also apply to some other SysV IPC resources?

This revision is now accepted and ready to land.Nov 15 2021, 11:23 AM