Skip to content

Commit

Permalink
ZEN: Set default max map count to (INT_MAX - 5)
Browse files Browse the repository at this point in the history
Per [Fedora][1], they intend to change the default max map count for
their distribution to improve OOTB compatibility with games played
through Steam/Proton.  The value they picked comes from the Steam Deck,
which defaults to INT_MAX - MAPCOUNT_ELF_CORE_MARGIN.

Since most ZEN and Liquorix users probably play games, follow Valve's
lead and raise this value to their default.

[1]: https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
  • Loading branch information
damentz authored and heftig committed Mar 11, 2024
1 parent 28f2f42 commit 0d27f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/mm.h
Expand Up @@ -191,7 +191,7 @@ static inline void __mm_zero_struct_page(struct page *page)
* that.
*/
#define MAPCOUNT_ELF_CORE_MARGIN (5)
#define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
#define DEFAULT_MAX_MAP_COUNT (INT_MAX - MAPCOUNT_ELF_CORE_MARGIN)

extern int sysctl_max_map_count;

Expand Down

0 comments on commit 0d27f76

Please sign in to comment.