kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: gilles.chanteperdrix@xenomai.org (Gilles Chanteperdrix)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Unset LOCKDEP and TRACE_IRQFLAGS_SUPPORT
Date: Fri, 2 Oct 2015 18:11:53 +0200	[thread overview]
Message-ID: <20151002161153.GT31137@hermes.click-hack.org> (raw)
In-Reply-To: <CAJfuBxwb0ZkfnVKZ+VrZCaD+1US3Zyh_is4YqFwaSFiiAoo=gw@mail.gmail.com>

On Fri, Oct 02, 2015 at 09:56:39AM -0600, Jim Cromie wrote:
> On Sun, Sep 27, 2015 at 8:52 AM, <Valdis.Kletnieks@vt.edu> wrote:
> 
> > On Sun, 27 Sep 2015 15:08:57 +1300, vibnwis said:
> >
> > > Xenomai patching succeeded but when running one of is test apps,
> > "latency"
> > > showing
> > > > > > > > > >> > 0"000.000| BUG in low_init(): [main] mlockall: Cannot
> > > allocate
> > > > > > > memory
> > > And the mailing list member suggested the following
> >
> > Is that in dmesg, or output from the test program?
> > Is there more output, or is that it?
> >
> > Personally, if TRACE_IRQFLAGS is causing an issue with mlock, I'd suspect
> > a very buggy patch indeed.  If it can't tolerate a trace function being
> > turned on, there;s probably some very questionable coding in there.....
> >
> >
> 
> FWIW, I think Xenomai is far better smelling than your quick sniff has told
> your olfactory sensors

TRACE_IRQFLAGS is broken with the I-pipe patch. At least on ARM. The
visible result is LOCKDEP false positives, but there may be some
more subtle kernel data structures corruption due to the fact that
the TRACE_IRQFLAFGS code is called from the Xenomai context. The
principle of Xenomai is to be able to run while Linux believes
its interrupts are off, in the middle of its critical sections. For
this to be possible, the code run in this context must never touch
any Linux kernel data structures. Enabling TRACE_IRQFLAGS breaks
this assumption: Linux code which potentially accesses Linux data
structures gets called from the Xenomai context. The consequences
can be anything, such as mlock failing, though in practice we never
get any report about that. The usual reason for mlockall failing is
because the user is not root, and with default ulimit settings at
least, mlockall can not be called by non-root users.

Anyway, the reason why TRACE_IRQFLAGS is still broken is my fault:
Jan has sent patches months ago, which I did not check.

-- 
					    Gilles.
https://click-hack.org

  reply	other threads:[~2015-10-02 16:11 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26 14:16 Unset LOCKDEP and TRACE_IRQFLAGS_SUPPORT vibnwis
2015-09-26 16:03 ` Valdis.Kletnieks at vt.edu
2015-09-26 23:06   ` vibnwis
2015-09-27  0:54     ` Valdis.Kletnieks at vt.edu
2015-09-27  1:09       ` vibnwis
2015-09-27  1:53         ` Valdis.Kletnieks at vt.edu
2015-09-27  2:08           ` vibnwis
2015-09-27  6:00             ` vibnwis
2015-09-27 14:56               ` Valdis.Kletnieks at vt.edu
2015-09-27 14:52             ` Valdis.Kletnieks at vt.edu
2015-09-27 20:58               ` vibnwis
2015-09-27 22:22                 ` Valdis.Kletnieks at vt.edu
2015-09-27 22:42                   ` vibnwis
2015-09-28  0:17                     ` Valdis.Kletnieks at vt.edu
2015-10-02 15:56               ` Jim Cromie
2015-10-02 16:11                 ` Gilles Chanteperdrix [this message]
2015-10-02 21:43                   ` Valdis.Kletnieks at vt.edu
2015-10-03  6:47                     ` Gilles Chanteperdrix
2015-10-03 12:33                   ` vibnwis
2015-10-03 13:11                     ` Gilles Chanteperdrix
2015-10-05  1:24                       ` vibnwis
2015-10-05  6:07                         ` Gilles Chanteperdrix
2015-10-05  7:56                           ` vibnwis
2015-10-05  7:07                         ` Gilles Chanteperdrix
2015-10-05  7:54                           ` vibnwis
2015-10-05  8:19                             ` Gilles Chanteperdrix
2015-10-03 13:13                     ` Gilles Chanteperdrix
2015-10-02 17:09                 ` Gilles Chanteperdrix

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=20151002161153.GT31137@hermes.click-hack.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=kernelnewbies@lists.kernelnewbies.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 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).