-
Notifications
You must be signed in to change notification settings - Fork 8.4k
kernel: dynamic: use 4k stack size for x86 #79443
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: dynamic: use 4k stack size for x86 #79443
Conversation
382c39a to
816921c
Compare
|
816921c to
8d8cb1f
Compare
|
Additional tuned configuration parameters for |
x86 architectures require a dynamic stack size that is a multiple of 4096 bytes due to mmu restrictions. For example, this test would previously fail when using the default dynamic stack size of 1024 bytes for 32-bit platforms. ``` west build -p auto -b qemu_x86/atom/nopae -t run \ tests/posix/common/ -- -DCONFIG_USERSPACE=y ``` It would pass with an additional argument ``` west build -p auto -b qemu_x86/atom/nopae -t run \ tests/posix/common/ -- -DCONFIG_USERSPACE=y \ -DCONFIG_DYNAMIC_THREAD_STACK_SIZE=4096 ``` Add a special default for x86 when using dynamic thread stacks. The x86 default removes the need for `boards/qemu_x86*.conf`, with the exception of `qemu_x86_tiny`. qemu_x86_tiny did not have sufficient memory (or configuration) to run the non-userspace tests, so bump up the available ram from 256k to 512k for this test and clone the .conf from the demand paging tests. Eventually, the common posix test should be split into more concise functional categories. Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
8d8cb1f to
cc1b09d
Compare
ycsin
left a comment
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.
I wonder if having a BUILD_ASSERT somewhere to make sure that it is always the multiple of 4096 would help?
Actually, there are per-arch macros that should round / pad stacks. It's confusing to me why they don't seem to work for x86. The extra .conf is required for for tiny as well. |
x86 architectures require a dynamic stack size that is a multiple of 4096 bytes due to mmu restrictions.
For example, this test would previously fail when using the default dynamic stack size of 1024 bytes for 32-bit platforms (because a specific board configuration file was not present).
It would pass with an additional argument
Add a special default for x86 when using dynamic thread stacks.
The x86 default removes the need for
boards/qemu_x86*.conf, with the exception ofqemu_x86_tiny.qemu_x86_tinydid not have sufficient memory (or configuration) to run the non-userspace tests, so bump up the available ram from 256k to 512k for this test and clone the.conffrom the demand paging tests.Eventually, the common posix test should be split into more concise functional categories to reduce ram requirements.