All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Bharath Achuta Bhat <baambekar@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Page-fault, switch to secondary mode
Date: Wed, 25 Aug 2010 11:53:20 +0200	[thread overview]
Message-ID: <1282730000.1709.49.camel@domain.hid> (raw)
In-Reply-To: <AANLkTikXsjX5oRTUYR3Tg_ew9-VEFVMiyTnFUGWRq9Sm@domain.hid>

On Wed, 2010-08-25 at 11:12 +0200, Bharath Achuta Bhat wrote:
> Hello Xenomai experts,
> 
> 
> I am running a xenomai-2.5.1 patched kernel (v 2.6.30.3) with ipipe
> version 2.7-06.
> The target is powerpc (MPC8533E).
> My application is switching to the secondary mode (I guess because of
> a page-fault) when ntohl() is called.
> This is a libc function and I am wondering why only this function
> (ntohl()) is causing a page-fault.

What memory are you reading from / writing to in the statement involving
ntohl()? Is this plain RAM, or mapped I/O memory?

> 
> 
> Here is how the application looks like
> 
> 
> main ()
> {
> ...
> ...
> /* Avoids memory swapping for this program */
> mlockall(MCL_CURRENT | MCL_FUTURE);
> 
> 
> ......
> ......
> /* signal handlers */
> .....
> .....
> /* create communication pipes */
> rt_pipe_create(&tPipe1, .....
> rt_pipe_create(&tPipe2,.......
> 
> 
> /* create RT tasks */
> rt_task_create(&tTask1,.....
> rt_task_create(&tTask2,......
> ...........
> ..........
> 
> 
> /* start the RT tasks */
> rt_task_start(&tTask1,.....
> ..............
> ..............
> 
> 
> /* turn the current thread into RT function */
> ret = rt_task_shadow(NULL, "RT main function", 1, T_SUSP);
> 
> 
> ....
> ....
> 
> 
> }
> 
> 
> One of the rt tasks created calls ntohl() and switches to secondary
> mode.
> Is there a way to avoid it ? 
> 
> 
> -- 
> Thanks and regards
> Bharath
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help

-- 
Philippe.




  parent reply	other threads:[~2010-08-25  9:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25  9:12 [Xenomai-help] Page-fault, switch to secondary mode Bharath Achuta Bhat
2010-08-25  9:42 ` Gilles Chanteperdrix
2010-08-25  9:53 ` Philippe Gerum [this message]
2010-08-25  9:59   ` Gilles Chanteperdrix
2010-08-25 10:06   ` Bharath Achuta Bhat
2010-08-25 14:22     ` Philippe Gerum
2010-08-26  7:20       ` Bharath Achuta Bhat

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=1282730000.1709.49.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=baambekar@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.