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)
Fri, Apr 19, 2:58 PM
Unknown Object (File)
Dec 23 2023, 1:07 AM
Unknown Object (File)
Dec 12 2023, 7:09 PM
Unknown Object (File)
Nov 23 2023, 5:17 PM
Unknown Object (File)
Sep 24 2023, 8:22 AM
Unknown Object (File)
Aug 14 2023, 9:16 AM
Unknown Object (File)
Aug 4 2023, 4:50 AM
Unknown Object (File)
Jun 25 2023, 11:29 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