tmedicci commented on PR #11842: URL: https://github.com/apache/nuttx/pull/11842#issuecomment-1979278850
> > > @tmedicci do you know how much PR #11777 increased the stack usage? Just looking that PR was impossible to know this side effect. I think we need some CI script to compare and show how much each PR are impacting in flash/RAM size and stack usage. @anchao any idea why your PR is increasing the stack? > > > > > > I didn't measure it directly, but it seems to be very reasonable that it would have been increased by the size of `struct task_info_s`. > > The problem itself appears when running the built-in `ps` command in the NuttShell. > > > could we hold 2KB default stack size? or we have to increase the default task stack size, instead updating every defconfig. > > > > > > Usually, 2KB is sufficient for most of the applications. The problem is specific to the init task, which is the `nsh` and its built-in commands. I prefer not to increase the default stack size... > > If so, it's better to change the default stack size for nsh, the default value should be suitable for the common usage. Newbie will surprise that ps in nsh will panic for many bultin support board. Stack usage is specific for each arch (there are minor changes about it depending on the arch and selected configs). One could change `nsh` stack size directly, but when `CONFIG_INIT_ENTRYPOINT="nsh_main"` (the most common), it would be overridden by `CONFIG_INIT_STACKSIZE` (which is the one I changed). > @tmedicci @xiaoxiang781216 if `ps` is failing after that PR then for some reason is increased the stack size. Espressif has an internal CI that does some hardware tests. I think having a low stack value defined in the config is useful to catch issues like this. Yes, it is... but even before this implementation, stack usage was near its limits (it even failed for specific defconfigs that had their `CONFIG_INIT_STACKSIZE` increased before this PR). Our internal CI ensures that Espressif's devices can boot and run simple commands (like `ps` and `free`), but we can not ensure this is valid for all other chips. We can think on a tool to evaluate this when submitting new PRs, but I don't think it fits this PR's purposes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
