linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Minor page faults from pthread_create()
@ 2012-01-06 20:46 Adrian Knoth
  2012-01-07 18:28 ` Remy Bohmer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adrian Knoth @ 2012-01-06 20:46 UTC (permalink / raw)
  To: linux-rt-users@vger.kernel.org

Hi!

While playing with

 
https://rt.wiki.kernel.org/articles/t/h/r/Threaded_RT-application_with_memory_locking_and_stack_handling_example_f48b.html

I was wondering why pthread_create() should cause minor page faults when
there is a pre-allocated pre-faulted 100MB memory pool.

Simply running the example causes roughly 30 minor page faults. When I
manually allocate stack memory for the stack (after mlockall() and
mallopt have been called) and use pthread_attr_setstack() before calling
pthread_create(), minor page faults drop to 2.

Does anybody happen to know what is causing these remaining two page
faults? My only guess so far is kernel memory to hold some
organizational data for the new thread after clone() has been invoked,
but this could also be completely wrong.

Note that I don't need to get page faults down to 0, I'm only looking
for an explanation to understand the issue at hand to confirm that
pthread_create() must not be used from an RT context.


TIA

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-09 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-06 20:46 Minor page faults from pthread_create() Adrian Knoth
2012-01-07 18:28 ` Remy Bohmer
2012-01-09 10:35 ` Minor page faults from pthread_create() aka still problems with 3.0.12-rt30 Tim Sander
2012-01-09 19:00 ` Minor page faults from pthread_create() Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).