From: Jakub Nowacki <j.s.nowacki@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Stack size of created task
Date: Wed, 13 Jul 2011 14:13:56 +0100 [thread overview]
Message-ID: <4E1D9A14.5040901@domain.hid> (raw)
In-Reply-To: <4E1D84FD.7050307@domain.hid>
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
next prev parent reply other threads:[~2011-07-13 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 11:37 [Xenomai-help] Stack size of created task Jakub Nowacki
2011-07-13 11:43 ` Gilles Chanteperdrix
2011-07-13 13:13 ` Jakub Nowacki [this message]
2011-07-13 18:04 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E1D9A14.5040901@domain.hid \
--to=j.s.nowacki@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.