<div dir="ltr"><div>It is a surprise for getting a reply from you, Gilles on this subject which I had posed on Xenomai forum and has been treated as if it was coming from an  &quot;idiot&quot;.  </div><div><br></div><div>Knowing this is not entirely Xenomai forum, I would still like to ask if I can get hold of the patch, please? if not, hear from you in Xenomai forum.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 October 2015 at 05:11, Gilles Chanteperdrix <span dir="ltr">&lt;<a href="mailto:gilles.chanteperdrix@xenomai.org" target="_blank">gilles.chanteperdrix@xenomai.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Oct 02, 2015 at 09:56:39AM -0600, Jim Cromie wrote:<br>
&gt; On Sun, Sep 27, 2015 at 8:52 AM, &lt;<a href="mailto:Valdis.Kletnieks@vt.edu">Valdis.Kletnieks@vt.edu</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; On Sun, 27 Sep 2015 15:08:57 +1300, vibnwis said:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Xenomai patching succeeded but when running one of is test apps,<br>
&gt; &gt; &quot;latency&quot;<br>
&gt; &gt; &gt; showing<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt; &gt;&gt; &gt; 0&quot;000.000| BUG in low_init(): [main] mlockall: Cannot<br>
&gt; &gt; &gt; allocate<br>
&gt; &gt; &gt; &gt; &gt; &gt; &gt; memory<br>
&gt; &gt; &gt; And the mailing list member suggested the following<br>
&gt; &gt;<br>
&gt; &gt; Is that in dmesg, or output from the test program?<br>
&gt; &gt; Is there more output, or is that it?<br>
&gt; &gt;<br>
&gt; &gt; Personally, if TRACE_IRQFLAGS is causing an issue with mlock, I&#39;d suspect<br>
&gt; &gt; a very buggy patch indeed.  If it can&#39;t tolerate a trace function being<br>
&gt; &gt; turned on, there;s probably some very questionable coding in there.....<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt; FWIW, I think Xenomai is far better smelling than your quick sniff has told<br>
&gt; your olfactory sensors<br>
<br>
TRACE_IRQFLAGS is broken with the I-pipe patch. At least on ARM. The<br>
visible result is LOCKDEP false positives, but there may be some<br>
more subtle kernel data structures corruption due to the fact that<br>
the TRACE_IRQFLAFGS code is called from the Xenomai context. The<br>
principle of Xenomai is to be able to run while Linux believes<br>
its interrupts are off, in the middle of its critical sections. For<br>
this to be possible, the code run in this context must never touch<br>
any Linux kernel data structures. Enabling TRACE_IRQFLAGS breaks<br>
this assumption: Linux code which potentially accesses Linux data<br>
structures gets called from the Xenomai context. The consequences<br>
can be anything, such as mlock failing, though in practice we never<br>
get any report about that. The usual reason for mlockall failing is<br>
because the user is not root, and with default ulimit settings at<br>
least, mlockall can not be called by non-root users.<br>
<br>
Anyway, the reason why TRACE_IRQFLAGS is still broken is my fault:<br>
Jan has sent patches months ago, which I did not check.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
                                            Gilles.<br>
<a href="https://click-hack.org" rel="noreferrer" target="_blank">https://click-hack.org</a><br>
</font></span></blockquote></div><br></div>