30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
|
From 531d884259632814e998d1662690daa1e57dd98c Mon Sep 17 00:00:00 2001
|
||
|
From: Steven Barrett <steven@liquorix.net>
|
||
|
Date: Thu, 27 Apr 2023 14:43:57 -0500
|
||
|
Subject: ZEN: Set default max map count to (INT_MAX - 5)
|
||
|
|
||
|
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
|
||
|
---
|
||
|
include/linux/mm.h | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/include/linux/mm.h
|
||
|
+++ b/include/linux/mm.h
|
||
|
@@ -197,7 +197,7 @@ static inline void __mm_zero_struct_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;
|
||
|
|