All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jeroen Van den Keybus <jeroen.vandenkeybus@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Page faults
Date: Tue, 28 Feb 2006 17:31:02 +0100	[thread overview]
Message-ID: <44047AC6.907@domain.hid> (raw)
In-Reply-To: <fd6a47a90602280622o4cfb2b79g@domain.hid>

Jeroen Van den Keybus wrote:
> I'm observing a considerable amount of Page Faults (5090 after an hour 
> or so), each one associated with a MSW increase in /proc/xenomai/stat. 
> I'm missing RT deadlines on those occasions and I want to fix it, so I 
> would like to know what Page Faults actually are.
>  

Since page faults cause mode switches as you observed, you might want to try using 
a built-in feature that sends a SIGXCPU signal to a task going back to the Linux 
domain (e.g. typically relaxing to process a fault). The way to do this is as follows:

- set the T_WARNSW bit for your task using the rt_task_set_mode() call. Something 
like rt_task_set_mode(0,T_WARNSW,NULL) would do.

- code a Linux signal handler, and register it for receiving SIGXCPU.

The signal is always sent on behalf of the relaxing task, so you just need to 
inspect the backtrace to discover the cause of the mode switch by analysing the 
inner frames. You may either use GDB and set a breakpoint in the handler, or play 
with the backtrace_*() routines available from the glibc.

ksrc/skins/native/snippets/sigxcpu.c gives an example of such use.

>  
> Jeroen.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help


-- 

Philippe.


  parent reply	other threads:[~2006-02-28 16:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-28 14:22 [Xenomai-help] Page faults Jeroen Van den Keybus
2006-02-28 15:05 ` Jan Kiszka
2006-02-28 15:29   ` Jeroen Van den Keybus
2006-02-28 16:29     ` Jan Kiszka
2006-02-28 16:31 ` Philippe Gerum [this message]
2006-02-28 17:08   ` Jeroen Van den Keybus
  -- strict thread matches above, loose matches on Subject: below --
2007-04-16 19:49 [Xenomai-help] page faults Jeff Weber
2007-04-16 20:05 ` Philippe Gerum
2007-04-16 20:20   ` Jeff Weber
2007-04-16 20:43     ` Gilles Chanteperdrix
2007-04-16 21:27       ` Jeff Weber
2007-04-16 21:34         ` Gilles Chanteperdrix
2007-04-17 13:21           ` Jeff Weber
2007-04-17 19:17             ` Gilles Chanteperdrix
2007-04-17 20:59               ` Jeff Weber
2007-04-20 16:43               ` Jeff Weber
2007-04-20 17:24                 ` Philippe Gerum

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=44047AC6.907@domain.hid \
    --to=rpm@xenomai.org \
    --cc=jeroen.vandenkeybus@domain.hid \
    --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.