From 6c2b0a38585af79523ba83c1f244087981125eaa Mon Sep 17 00:00:00 2001 From: Patryk Kubiak Date: Wed, 30 Sep 2026 18:28:09 +0200 Subject: [PATCH] automount: 1536 B stack instead of 2048 Measured on STM32F746G-DISCO: an automount thread peaks at 1652 B while the card is read (probe and mount go dmblkid/dmfatfs -> dmvfs -> dmdevfs -> dmsdio), whether it mounts or has nothing to do. 1536 B plus dmosi's 512 B startup reserve leaves ~400 B; every mounted volume saves 512 B. Co-Authored-By: Claude Opus 5.5 --- services/automount/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/automount/CMakeLists.txt b/services/automount/CMakeLists.txt index 668c98f..9d54508 100644 --- a/services/automount/CMakeLists.txt +++ b/services/automount/CMakeLists.txt @@ -6,7 +6,10 @@ # loaded once for all instances. set(DMOD_MODULE_NAME automount) set(DMOD_AUTHOR_NAME "Patryk Kubiak") -set(DMOD_STACK_SIZE 2048) +# Measured on STM32F746G-DISCO (ps STACK column): the peak is 1652 B of the +# 2048 B thread stack (1536 + DMOSI_THREAD_STACK_OVERHEAD), reached while +# the card is read (dmblkid/dmfatfs -> dmvfs -> dmdevfs -> dmsdio). +set(DMOD_STACK_SIZE 1536) set(DMOD_PRIORITY 0) set(DMOD_DMR_PATH ${CMAKE_CURRENT_SOURCE_DIR}/automount.dmr)