Skip to contentSkip to conversation

kmemleak: Increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K

PATCH In review Nicolas Boichat 3 participants 3 messages Jul 30, 2019 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmemleak: Increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE default to 16K

The current default value (400) is too low on many systems (e.g. some ARM64 platform takes up 1000+ entries).

syzbot uses 16000 as default value, and has proved to be enough on beefy configurations, so let's pick that value.

This consumes more RAM on boot (each entry is 160 bytes, so in total ~2.5MB of RAM), but the memory would later be freed (early_log is __initdata).

---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/Kconfig.debug +1 -1
index f567875b87657de..b5a24045ab13310 100644
@@ -596,7 +596,7 @@ config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
 	int "Maximum kmemleak early log entries"
 	depends on DEBUG_KMEMLEAK
 	range 200 40000
-	default 400
+	default 16000
 	help
 	  Kmemleak must track all the memory allocations to avoid
 	  reporting false positives. Since memory may be allocated or
Signature · 1 line
2.22.0.709.g102302147b-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Nicolas Boichat

The current default value (400) is too low on many systems (e.g. some ARM64 platform takes up 1000+ entries).

syzbot uses 16000 as default value, and has proved to be enough on beefy configurations, so let's pick that value.

Quoted 6 lines

This consumes more RAM on boot (each entry is 160 bytes, so in total ~2.5MB of RAM), but the memory would later be freed (early_log is __initdata).

Acked-by
#2 lore raw
Quoted 8 lines · Catalin Marinas
Quoted 6 lines · Nicolas Boichat

The current default value (400) is too low on many systems (e.g. some ARM64 platform takes up 1000+ entries).

syzbot uses 16000 as default value, and has proved to be enough on beefy configurations, so let's pick that value.

Quoted 8 lines
Quoted 6 lines

This consumes more RAM on boot (each entry is 160 bytes, so in total ~2.5MB of RAM), but the memory would later be freed (early_log is __initdata).