All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] Dealing with too small thread stacks
Date: Fri, 17 Apr 2015 20:22:38 +0200	[thread overview]
Message-ID: <55314F6E.6010806@siemens.com> (raw)
In-Reply-To: <55314426.7040300@siemens.com>

On 2015-04-17 19:34, Jan Kiszka wrote:
> Hi,
> 
> analyzing page faults of an application that prefers to set its own
> stacks, I noticed a problem in Xenomai (2 and 3), at least from the
> usability POV: We document the minimum stack stack as PTHREAD_STACK_MIN
> + 1 page, at least in Xenomai 3, and we enforce that on thread creation.
> However, enforcement is doomed to fail if the stack is preallocated (and
> that too small).

Another aspect in this: I just realized that the glibc tends to ignore
our "+ getpagesize()" in the stack calculation. That's at least true for
the x86-64 systems with glibc 2.19 on which I tested.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


      parent reply	other threads:[~2015-04-17 18:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 17:34 [Xenomai] Dealing with too small thread stacks Jan Kiszka
2015-04-17 17:50 ` Gilles Chanteperdrix
2015-04-17 18:05   ` Jan Kiszka
2015-04-17 18:08     ` Gilles Chanteperdrix
2015-04-17 18:10       ` Jan Kiszka
2015-04-17 18:12         ` Gilles Chanteperdrix
2015-04-17 18:17           ` Jan Kiszka
2015-04-17 18:24             ` Gilles Chanteperdrix
2015-04-17 18:26               ` Jan Kiszka
2015-04-17 18:30                 ` Gilles Chanteperdrix
2015-04-17 18:34                   ` Jan Kiszka
2015-04-17 18:46                     ` Gilles Chanteperdrix
2015-04-17 18:50                     ` Gilles Chanteperdrix
2015-04-17 18:22 ` Jan Kiszka [this message]

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=55314F6E.6010806@siemens.com \
    --to=jan.kiszka@siemens.com \
    --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.