Page MenuHomeFreeBSD

linprocfs: Add /proc/vm/max_map_count
ClosedPublic

Authored by dchagin on May 30 2022, 3:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 1, 5:40 AM
Unknown Object (File)
Thu, Aug 29, 9:38 PM
Unknown Object (File)
Wed, Aug 28, 7:36 AM
Unknown Object (File)
Wed, Aug 28, 7:32 AM
Unknown Object (File)
Wed, Aug 28, 6:16 AM
Unknown Object (File)
Wed, Aug 28, 6:00 AM
Unknown Object (File)
Sun, Aug 18, 7:21 AM
Unknown Object (File)
Wed, Aug 14, 11:14 PM
Subscribers

Details

Summary

On Linux this limits the number of maps per mm struct.
We don't limit mappings, return a suitable large value.

Diff Detail

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

Event Timeline

emaste added a subscriber: emaste.

Seems fine to me. Does Linux have a default high value equivalent to "no limit?" I'd be slightly worried that applications would be unprepared to handle extremely large values but I imagine INT32_MAX is unlikely to be a problem.

This revision is now accepted and ready to land.May 30 2022, 5:29 PM

Seems fine to me. Does Linux have a default high value equivalent to "no limit?" I'd be slightly worried that applications would be unprepared to handle extremely large values but I imagine INT32_MAX is unlikely to be a problem.

Linux limits it to 65530 due to Linux coredump method restrictions, described here https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/mm.h?h=v5.17
I don't think the number matters here, we can return USHORT_MAX-5 as in the Linux, also Illumos also limits it to some high value

This revision was automatically updated to reflect the committed changes.