these configs have the following default values:

   CONFIG_SMP_IDLETHREAD_STACKSIZE=2048
   CONFIG_IDLETHREAD_STACKSIZE=1024

is there any rationale of these values?
the kconfig help text seems to suggest the opposite; the SMP one
should be smaller.

Partially.  Yes, there is a reason for the to stacksizes to be different.  CPU0 is different from all of the other CPUs. CONFIG_IDLETHREAD_STACKSIZE is for CPU0; CONFIG_SMP_IDLETHREAD_STACKSIZE is for the other CPUs.  CPU0 must do all of the hardware initialization and OS bring-up plus start the initial task.  The other CPUs don't have to do any of that initialization.

That means that CONFIG_IDLETHREAD_STACKSIZE should be relatively large; CONFIG_SMP_IDLETHREAD_STACKSIZE, on the other hand, may be relatively small.

But that is not what I am seeing in the configuration data you are showing.  It looks unoptimized.  2048 is the default size for almost all stacks.  The idea is that you want everything to run "out of the box" and people producing products should take the time to tune the most appropriate stack sizes for a product.  2048 is usually bigger than is needed.

So I think that CONFIG_IDLETHREAD_STACKSIZE has been tuned to 1024 but CONFIG_SMP_IDLETHREAD_STACKSIZE is still at the default of 2048 and is need of tuning.  It could probably be as small as 512 or 768 bytes I would think.

Greg

Reply via email to