Index: sys/compat/linprocfs/linprocfs.c =================================================================== --- sys/compat/linprocfs/linprocfs.c +++ sys/compat/linprocfs/linprocfs.c @@ -1978,6 +1978,21 @@ return (0); } +/* + * Filler function for proc/sys/vm/max_map_count + * + * Maximum number of active map areas, on Linux this limits the number + * of vmaps per mm struct. We don't limit mappings, return a suitable + * large value. + */ +static int +linprocfs_domax_map_cnt(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "%d\n", INT32_MAX); + return (0); +} + /* * Constructor */ @@ -2123,6 +2138,8 @@ dir = pfs_create_dir(sys, "vm", NULL, NULL, NULL, 0); pfs_create_file(dir, "min_free_kbytes", &linprocfs_dominfree, NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "max_map_count", &linprocfs_domax_map_cnt, + NULL, NULL, NULL, PFS_RD); return (0); }