-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kernel: Kconfig: increase test default MAIN_STACK_SIZE #31865
kernel: Kconfig: increase test default MAIN_STACK_SIZE #31865
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with the motive, not sure with the value and how to set it :) Left a comment.
kernel/Kconfig
Outdated
@@ -150,7 +150,7 @@ config SCHED_CPU_MASK | |||
config MAIN_STACK_SIZE | |||
int "Size of stack for initialization and main thread" | |||
default 2048 if COVERAGE_GCOV | |||
default 512 if ZTEST && !(RISCV || X86) | |||
default 768 if ZTEST && !(RISCV || X86) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls, make this 1024;
768 is not a power-of-2, and Cortex-M builds on ARMv7-M with Userspace will move to 1024 anyway... So putting 1024 will be less confusing.
Alternatively (since your primary target is ARM Cortex-M) you can add a new default line before line 153:
default 1024 if TEST_ARM_CORTEX_M
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you won't be changing the default setting for other ARCHes like Xtensa, Sparc, AARC64 and ARC
There are more and more tests that fail due to stackoverflow. Increasing MAIN_STACK_SIZE to fix those issues. Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
b3c9d2c
to
08ef875
Compare
@nashif that's for v2-5-0 release, imho |
There are several reasons to increase MAIN_STACK_SIZE for test purpose:
activation of CONFIG_FPU_SHARING by default when CONFIG_FPU is enabled for ARM arch (see ARM: Make FPU Sharing the default mode and activate Lazy FP stacking dynamically #31772)
This increase stack usage and requires MAIN_STACK_SIZE enlargement.
more and more tests failed due to stackoverflow.
And it concerns several boards: stm32f3_disco and nucleo_f746zg
Arbitrary increase from 512 to 768.
This fixes above issues.
No regression found on STM32 test bench.