All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Johan Borkhuis <j.borkhuis@domain.hid>
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] Xenomai and mlockall
Date: Tue, 26 Jun 2007 09:26:39 +0200	[thread overview]
Message-ID: <1182842799.18525.9.camel@domain.hid> (raw)
In-Reply-To: <467FBC67.8030805@domain.hid>

On Mon, 2007-06-25 at 15:00 +0200, Johan Borkhuis wrote:
> I am trying to run my Xenomai application as non-root. I disabled 
> XENO_OPT_SECURITY_ACCESS to allow non-root users to run Xenomai 
> applications. However, this causes my application to exit with the error:
> 
> Xenomai: process memory not locked (missing mlockall?)
> 
> Is there a way to avoid this error? I am running on an embedded system 
> without swap and without disk, so there is no real need for mlock or 
> mlockall.
> 

swap is not the only source of page faults, ondemand application/library
loading is another one.

> Is there a way to "tweak" the CAP_IPC_LOCK capability of the system or 
> the task so that I can run mlockall call, or is there a way to disable 
> this check on Xenomai?

No way to disable it, since doing so would basically make your system
dysfunctional by risking page faults while not running over a regular
Linux context (i.e. Xenomai's primary domain).

IOW, you do want mlockall() to be in effect for Xenomai apps.

Hint: If you think some process is overconsuming locked memory, you may
want to have a look at /proc/<pid>/maps for the process in question, and
check the size of the various segments listed there, and especially the
stack related one.

> 
> Kind regards,
>     Johan Borkhuis
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
-- 
Philippe.




  parent reply	other threads:[~2007-06-26  7:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25 13:00 [Xenomai-help] Xenomai and mlockall Johan Borkhuis
     [not found] ` <cbe23c50706250904i57afbc0xfbce52fdb9dccc66@domain.hid>
2007-06-25 16:05   ` [Xenomai-help] Fwd: " Eric Noulard
2007-06-26  6:10     ` Johan Borkhuis
2007-06-25 18:04 ` [Xenomai-help] " Paul
2007-06-26  7:26 ` Philippe Gerum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-06-26  8:53 Fillod Stephane

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=1182842799.18525.9.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=Xenomai-help@domain.hid \
    --cc=j.borkhuis@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.