<div dir="ltr"><div> </div><div><div>Thanks Daniel for help!</div><div>I found the same solution.</div><div>I think that my patch is for rebased-3.10 branch.</div></div><div> </div><div>In kernel/sched/core.c, litmus/litmus.h is originally included from litmus/sched_trace.h in line 90.</div>
<div> </div><div>--</div><div>litmus/litmus.h</div><div> from line 12:trace/events/litmus.h</div><div> from line 169:litmus/sched_trace.h</div><div> from line 90:kernel/sched/core.c</div><div>--</div><div> </div><div>If CONFIG_SCHED_LITMUS_TRACEPOINT is defined, litmus/sched_trace.h includes trace/events/litmus.h.</div>
<div> </div><div> </div><div> </div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 19, 2013 at 1:52 PM, Daniel Bristot de Oliveira <span dir="ltr"><<a href="mailto:danielbristot@gmail.com" target="_blank">danielbristot@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Fri, Jul 19, 2013 at 2:20 PM, Björn Brandenburg <span dir="ltr"><<a href="mailto:bbb@mpi-sws.org" target="_blank">bbb@mpi-sws.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="auto"><div>Thanks—this is the 3.10 branch? It compiles just fine for me. Is there some configuration option that is affecting this?</div>
<div><br></div></div></blockquote><div><br></div></div><div>I got this on 3.8 too.<br><br></div><div>I fixed including the litmus/litmus.h.<br><br></div><div>The function 'is_realtime' is called on __mutex_lock_common, only if:<br>
</div><div><br>CONFIG_MUTEX_SPIN_ON_OWNER=y<br><br></div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
<div dir="auto"><div></div><div>
- Björn</div><div><div><div><br>On 19.07.2013, at 19:06, Hiroyuki Chishiro <<a href="mailto:chishiro@cs.unc.edu" target="_blank">chishiro@cs.unc.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">
<div> </div><div>Hi Björn,</div><div> </div><div>I found the following compile errors.</div><div> </div><div>--</div><div>kernel/mutex.c: In function '__mutex_lock_common':<br>kernel/mutex.c:331:11: error: implicit declaration of function 'is_realtime' [-Werror=implicit-function-declaration]</div>
<div> </div><div>kernel/sched/core.c: In function 'ttwu_queue':<br>kernel/sched/core.c:1474:2: error: implicit declaration of function 'is_realtime' [-Werror=implicit-function-declaration]<br>kernel/sched/core.c: In function 'finish_task_switch':<br>
kernel/sched/core.c:1926:32: error: 'NO_CPU' undeclared (first use in this function)<br>kernel/sched/core.c:1926:32: note: each undeclared identifier is reported only once for each function it appears in<br>kernel/sched/core.c: In function '__schedule':<br>
kernel/sched/core.c:3117:2: error: implicit declaration of function 'srp_ceiling_block' [-Werror=implicit-function-declaration]<br>kernel/sched/core.c: In function '__sched_setscheduler':<br>kernel/sched/core.c:4024:3: error: implicit declaration of function 'litmus_admit_task' [-Werror=implicit-function-declaration]<br>
kernel/sched/core.c:4086:3: error: implicit declaration of function 'litmus_exit_task' [-Werror=implicit-function-declaration]<br>kernel/sched/core.c:4093:50: error: 'NO_CPU' undeclared (first use in this function)</div>
<div>--</div><div> </div><div>To fix these errors, include "litmus/litmus.h" in each file.</div><div> </div><div><br> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 18, 2013 at 5:11 PM, Björn Brandenburg <span dir="ltr"><<a href="mailto:bbb@mpi-sws.org" target="_blank">bbb@mpi-sws.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><div><div><br><div><div>On Jul 18, 2013, at 10:51 PM, Daniel Bristot de Oliveira <<a href="mailto:danielbristot@gmail.com" target="_blank">danielbristot@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div>I'm on a Ms in automation engineering at UFSC - Brazil, working with real time Linux, but, my works fits better on PREEMPT_RT, then I'm using it. I already have made tests with Litmus RT, but I'm not a Litmus RT expert. I'm interested to help.<span> </span><br>
<br>At my work (I work on a company too, where I use the PREEMPT_RT too) I have a Xeon E5620 @ 2.40GHz at my desk, where I compile the rebased-3.8.13.<br><br>I used the make localmodconfig, the config file is here:<span> </span><a href="http://www.bristot.eti.br/files/litmus/3_8_13/config" target="_blank">http://www.bristot.eti.br/files/litmus/3_8_13/config</a>, and I build the kernel as is on the git.<br>
<br>I got just one compilation problem:<br><br> CC kernel/sched/core.o<br>kernel/sched/core.c: In function ‘ttwu_queue’:<br>kernel/sched/core.c:1417:2: error: implicit declaration of function ‘is_realtime’ [-Werror=implicit-function-declaration]<br>
kernel/sched/core.c: In function ‘finish_task_switch’:<br>kernel/sched/core.c:1871:32: error: ‘NO_CPU’ undeclared (first use in this function)<br>kernel/sched/core.c:1871:32: note: each undeclared identifier is reported only once for each function it appears in<br>
kernel/sched/core.c: In function ‘__schedule’:<br>kernel/sched/core.c:3051:2: error: implicit declaration of function ‘srp_ceiling_block’ [-Werror=implicit-function-declaration]<br>kernel/sched/core.c: In function ‘__sched_setscheduler’:<br>
kernel/sched/core.c:3952:3: error: implicit declaration of function ‘litmus_admit_task’ [-Werror=implicit-function-declaration]<br>kernel/sched/core.c:4014:3: error: implicit declaration of function ‘litmus_exit_task’ [-Werror=implicit-function-declaration]<br>
kernel/sched/core.c:4021:50: error: ‘NO_CPU’ undeclared (first use in this function)<br>cc1: some warnings being treated as errors<br>make[2]: *** [kernel/sched/core.o] Error 1<br>make[1]: *** [kernel/sched] Error 2<br>make: *** [kernel] Error 2<br>
[root@localhost litmus-rt-preempt_rt]#<span> </span><br><br><br>that I fixed with this:<br><br>diff --git a/kernel/sched/core.c b/kernel/sched/core.c<br>index 2a6de74..c36d86d 100644<br>--- a/kernel/sched/core.c<br>+++ b/kernel/sched/core.c<br>
@@ -89,6 +89,7 @@<br> #include <litmus/trace.h><br> #include <litmus/sched_trace.h><br> #include <litmus/sched_plugin.h><br>+#include <litmus/litmus.h><br> <br> void litmus_tick(struct rq*, struct task_struct*);<br>
<br>the system is running, what's the next step? compile with PREEMPT_RT?</div></blockquote><br></div></div></div><div>Hi Daniel,</div><div><br></div><div>welcome! Thanks for joining the effort. With the running system, the next step would be to compile liblitmus (from the port-3.10 branch), pick a plugin with setsched, and run 'runtests', which runs the liblitmus test suite.</div>
<div><br></div><div>If everything works, the second step would be to build the branch that includes PREEMPT_RT:</div><br><div><span style="white-space:pre-wrap"> </span><a href="https://github.com/LITMUS-RT/litmus-rt/commits/rebased-3.8.13-rt14" target="_blank">https://github.com/LITMUS-RT/litmus-rt/commits/rebased-3.8.13-rt14</a></div>
<div><br></div><div>And then debug it… I assume we are breaking some PREEMPT_RT assumptions that will need fixing. If you have experience with PREEMPT_RT, you could help us out by suggesting fixes for bugs in LITMUS^RT.</div>
<div><br></div><div>For example, rt_domain.c calls hrtimer_cancel() while (indirectly) holding a run queue lock. This works fine in mainline, but causes a recursive locking problem in PREEMPT_RT. Once that is fixed, I'm sure there will be more that breaks.</div>
<div><br></div><div>Thanks,</div><div>Björn</div><div><br></div></div><br>_______________________________________________<br>
litmus-dev mailing list<br>
<a href="mailto:litmus-dev@lists.litmus-rt.org" target="_blank">litmus-dev@lists.litmus-rt.org</a><br>
<a href="https://lists.litmus-rt.org/listinfo/litmus-dev" target="_blank">https://lists.litmus-rt.org/listinfo/litmus-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Hiroyuki Chishiro</p><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">
Visiting Scholar</p><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Department of Computer Science</p><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">
The University of North Carolina at Chapel Hill</p>
</div>
</div></blockquote></div></div><blockquote type="cite"><div><rebased-3.10_compile.patch></div></blockquote><div><blockquote type="cite"><div><span>_______________________________________________</span><br>
<span>litmus-dev mailing list</span><br><span><a href="mailto:litmus-dev@lists.litmus-rt.org" target="_blank">litmus-dev@lists.litmus-rt.org</a></span><br><span><a href="https://lists.litmus-rt.org/listinfo/litmus-dev" target="_blank">https://lists.litmus-rt.org/listinfo/litmus-dev</a></span><br>
</div></blockquote></div></div><br>_______________________________________________<br>
litmus-dev mailing list<br>
<a href="mailto:litmus-dev@lists.litmus-rt.org" target="_blank">litmus-dev@lists.litmus-rt.org</a><br>
<a href="https://lists.litmus-rt.org/listinfo/litmus-dev" target="_blank">https://lists.litmus-rt.org/listinfo/litmus-dev</a><br>
<br></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Daniel Bristot de Oliveira
</font></span></div></div>
<br>_______________________________________________<br>
litmus-dev mailing list<br>
<a href="mailto:litmus-dev@lists.litmus-rt.org">litmus-dev@lists.litmus-rt.org</a><br>
<a href="https://lists.litmus-rt.org/listinfo/litmus-dev" target="_blank">https://lists.litmus-rt.org/listinfo/litmus-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hiroyuki Chishiro</p><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Visiting Scholar</p><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Department of Computer Science</p><p style="margin:0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
The University of North Carolina at Chapel Hill</p>
</div>