[PATCH 3/3] erofs-utils: lib: shorten EROFS_FRAGMENT_INMEM_SZ_MAX

Gao Xiang hsiangkao at linux.alibaba.com
Fri Feb 14 17:24:07 AEDT 2025


EROFS_CONFIG_COMPR_MAX_SZ (currently 4MiB) is so large that could
cause OOM kill for small machines.

Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
 lib/fragments.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fragments.c b/lib/fragments.c
index 3e97f14..758fb87 100644
--- a/lib/fragments.c
+++ b/lib/fragments.c
@@ -31,7 +31,7 @@ struct erofs_fragment_dedupe_item {
 	u8			data[];
 };
 
-#define EROFS_FRAGMENT_INMEM_SZ_MAX	EROFS_CONFIG_COMPR_MAX_SZ
+#define EROFS_FRAGMENT_INMEM_SZ_MAX	(128 * 1024)
 #define EROFS_TOF_HASHLEN		16
 
 #define FRAGMENT_HASHSIZE		65536
-- 
2.43.5



More information about the Linux-erofs mailing list