All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] User space stack pre-faulting
Date: Wed, 22 Jun 2011 12:56:53 +0200	[thread overview]
Message-ID: <4E01CA75.90201@domain.hid> (raw)
In-Reply-To: <4E01CA10.1090703@domain.hid>

On 06/22/2011 12:55 PM, Jan Kiszka wrote:
> On 2011-06-22 12:36, Gilles Chanteperdrix wrote:
>> On 06/22/2011 11:26 AM, Jan Kiszka wrote:
>>> Hi Gilles,
>>>
>>> do you remember reasons for only pre-faulting the main thread's stack?
>>> The desire to avoid wasting resources by forcing all stacks into memory?
>>>
>>> I've the requirement on my table to provide a generic solution of all
>>> shadow threads. I think this should be possible using pthread_getattr_np
>>> and walking the stack page-wise, but I may miss some pitfall.
>>
>> Last time I checked, only the main thread stack was mapped on demand.
>> Other threads have mmaped stacks, which are made present by mlockall,
>> so, do not need faulting.
> 
> That's definitely not the case in general. Customer has just confirmed
> that pre-faulting thread stacks avoids first-access domain switches.

self-contained test case please.

> 
> Jan
> 


-- 
                                                                Gilles.


  reply	other threads:[~2011-06-22 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  9:26 [Xenomai-core] User space stack pre-faulting Jan Kiszka
2011-06-22 10:36 ` Gilles Chanteperdrix
2011-06-22 10:55   ` Jan Kiszka
2011-06-22 10:56     ` Gilles Chanteperdrix [this message]
2011-06-22 12:26       ` Jan Kiszka

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=4E01CA75.90201@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=Xenomai-core@domain.hid \
    --cc=jan.kiszka@domain.hid \
    /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.