On 07/13/2011 12:43 PM, Gilles Chanteperdrix wrote:
The stack size of a task is highly dependent on what the task does, and
a little bit less on the architecture. There is no generic answer.
Yes, that is understandable.
I've found in xenomai/inclues/arm-generic/stack.h that xeno_stack, which
is used in rt_task_create have a default value of __WORDSIZE*1024,
hence, 64kB on 64-bit system. So using 0 stack size in rt_create_stack
means that it'll be 64kB in my case, which seems to be a lot compared to
the previous version. Am I correct?
I'm still not sure should I assume that stack size 0, which is
(probably) __WORDSIZE*1024, is large enough for the vast majority of
practical cases or put it as a variable. Also, is there any way to
measure/asses the size of stack that is needed for a particular task or
just when it sudden crashes increase the stack size has to be increased?
I don't think that in RTXI very complicated RT tasks are used, so
default size should be more than enough, but I'm still not sure what
might indicate how large stack should be. As I understand it is related
to the amounts of memory being used by a task, which is put on the stack
during task switching, am I right?
> The problem with switchtest was not the task size, but the number of
> kernel stacks which were available in the kernel threads stacks pool.
> That is an entirely different issue.
>
I understand. I was referring to it because some 'safe' value of 8kB
appeared there.
Cheers,
Jakub
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help