<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" id="owaParaStyle" style="display: none;">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body dir="ltr" fpstyle="1" aria-label="Message body" tabindex="0" id="">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri,Arial,Helvetica,sans-serif; font-size: 12pt; color: #000000; margin: 0">
<p>Sorry about the wrong file, here is the file.</p>
<div>
<p><br>
</p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>Zheng Luo<br>
</div>
</div>
</div>
<p><br>
</p>
<div style="color: rgb(40, 40, 40);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> litmus-dev-bounces@lists.litmus-rt.org <litmus-dev-bounces@lists.litmus-rt.org> on behalf of Glenn Elliott <gelliott@cs.unc.edu><br>
<b>Sent:</b> Tuesday, November 19, 2013 1:55 PM<br>
<b>To:</b> litmus-dev@lists.litmus-rt.org<br>
<b>Subject:</b> Re: [LITMUS^RT] Question about GSN-EDF in Litmus</font>
<div> </div>
</div>
<div>Hi Zheng,
<div><br>
</div>
<div>I am actually interested in litmus-rt/.config, not these.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Glenn</div>
<div><br>
</div>
<div><br>
<div>
<div>On Nov 19, 2013, at 3:41 PM, Luo, Zheng <<a href="mailto:luozheng@wustl.edu">luozheng@wustl.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr" tabindex="0" id="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; margin:0px">
<div style="margin-top:0px; margin-bottom:0px">I send you both .config in ft_trace and liblitmus.</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Since the .config can not be send directly, I rename the files.</div>
<div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; margin:0px">
Zheng Luo<br>
</div>
</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="color:rgb(40,40,40)">
<hr tabindex="-1" style="display:inline-block; width:698px">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:litmus-dev-bounces@lists.litmus-rt.org">litmus-dev-bounces@lists.litmus-rt.org</a> <<a href="mailto:litmus-dev-bounces@lists.litmus-rt.org">litmus-dev-bounces@lists.litmus-rt.org</a>>
on behalf of Glenn Elliott <<a href="mailto:gelliott@cs.unc.edu">gelliott@cs.unc.edu</a>><br>
<b>Sent:</b><span class="Apple-converted-space"> </span>Tuesday, November 19, 2013 11:40 AM<br>
<b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:litmus-dev@lists.litmus-rt.org">litmus-dev@lists.litmus-rt.org</a><br>
<b>Subject:</b><span class="Apple-converted-space"> </span>Re: [LITMUS^RT] Question about GSN-EDF in Litmus</font>
<div> </div>
</div>
<div>
<div>Would you mind sharing your .config?</div>
<br>
<div>
<div>On Nov 19, 2013, at 11:56 AM, Luo, Zheng <<a href="mailto:luozheng@wustl.edu" title="mailto:luozheng@wustl.edu
Ctrl+click or tap to follow link">luozheng@wustl.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr" tabindex="0" id="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; margin:0px">
<div style="margin-top:0px; margin-bottom:0px">Thanks Glenn,</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">I used it to measure the time, but I have some problems with it. <span style="font-size:12pt">I tried to started the ./st_trace, but I got some error message. All the output is in the screenshot.</span></div>
<div style="margin-top:0px; margin-bottom:0px"><span style="font-size:12pt"><br>
</span></div>
<div style="margin-top:0px; margin-bottom:0px"><span style="font-size:12pt">Also, there is error message in the st--bin files.<span class="Apple-converted-space"> </span></span><font size="3">And the <span style="line-height:18px; background-color:rgb(255,255,255)">sched_trace0,
sched_trace1, sched_trace2, sched_trace3 are all empty.</span><span style="background-color:rgb(255,255,255); line-height:18px"> </span></font><span style="font-size:12pt"> </span><span style="font-size:12pt">The simple code that I used to test is the base_mt_task.c. </span></div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">I am really confused, can you help me figure that out where I am wrong? Because you mentioned that Litums can trace time in a more fine_grained way. Therefore I will not count the clock cycle from the user space.</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">Thank you very much. Looking forward to your reply.</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; margin:0px">
Zheng Luo<br>
</div>
</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="color:rgb(40,40,40)">
<hr tabindex="-1" style="display:inline-block; width:691px">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:litmus-dev-bounces@lists.litmus-rt.org">litmus-dev-bounces@lists.litmus-rt.org</a><span class="Apple-converted-space"> </span><<a href="mailto:litmus-dev-bounces@lists.litmus-rt.org">litmus-dev-bounces@lists.litmus-rt.org</a>>
on behalf of Glenn Elliott <<a href="mailto:gelliott@cs.unc.edu">gelliott@cs.unc.edu</a>><br>
<b>Sent:</b><span class="Apple-converted-space"> </span>Monday, November 18, 2013 11:52 AM<br>
<b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:litmus-dev@lists.litmus-rt.org">litmus-dev@lists.litmus-rt.org</a><br>
<b>Subject:</b><span class="Apple-converted-space"> </span>Re: [LITMUS^RT] Question about GSN-EDF in Litmus</font>
<div> </div>
</div>
<div>
<div>I believe your questions may be answered by the Litmus tracing tutorial: <a href="https://wiki.litmus-rt.org/litmus/Tracing">https://wiki.litmus-rt.org/litmus/Tracing</a></div>
<div><br>
</div>
<div>While you should read the whole tutorial, you will be most interested in the “Recording Scheduling Traces” section.</div>
<div><br>
</div>
<div>You’ll use the feather-trace tools to capture the logs. Then you can use Björn’s sched-trace-tools for analyzing them: <a href="https://github.com/brandenburg/sched-trace-tools">https://github.com/brandenburg/sched-trace-tools</a></div>
<div><br>
</div>
<div>-Glenn</div>
<div><br>
</div>
<br>
<div>
<div>On Nov 18, 2013, at 10:56 AM, Luo, Zheng <<a href="mailto:luozheng@wustl.edu">luozheng@wustl.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr" tabindex="0" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; margin:0px">
<div style="margin-top:0px; margin-bottom:0px">Thank you very much for the reply. That is very helpful. In the email, you mentioned that <span style="color:rgb(40,40,40); font-size:12pt">I can also use Litmus’s sched_trace logs to get more accurate information
on job release times, completion times, and many other events.</span><span style="color:rgb(40,40,40); font-size:12pt"> I was wondering where that program is?</span></div>
<div style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(40,40,40); font-size:12pt"><br>
</span></div>
<div style="margin-top:0px; margin-bottom:0px"><span style="color:rgb(40,40,40); font-size:12pt">Is it the program in the folder </span><font color="#282828">ft_tools, named st_trace? It seems that I can not get the data properly from it.</font></div>
<div style="margin-top:0px; margin-bottom:0px"><font color="#282828"><br>
</font></div>
<div style="margin-top:0px; margin-bottom:0px"><font color="#282828">Also, is there any good documentation of Litmus? I sometimes feel very hard to figure out the function of each program.</font></div>
<div style="margin-top:0px; margin-bottom:0px"><font color="#282828"><br>
</font></div>
<div style="margin-top:0px; margin-bottom:0px"><font color="#282828">Thank you very much. Looking forward to your reply.</font></div>
<div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; margin:0px">
Zheng Luo<br>
</div>
</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="color:rgb(40,40,40)">
<hr tabindex="-1" style="display:inline-block; width:691px">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt"><b>From:</b><span class="Apple-converted-space"> </span><a href="mailto:litmus-dev-bounces@lists.litmus-rt.org">litmus-dev-bounces@lists.litmus-rt.org</a><span class="Apple-converted-space"> </span><<a href="mailto:litmus-dev-bounces@lists.litmus-rt.org">litmus-dev-bounces@lists.litmus-rt.org</a>>
on behalf of Glenn Elliott <<a href="mailto:gelliott@cs.unc.edu">gelliott@cs.unc.edu</a>><br>
<b>Sent:</b><span class="Apple-converted-space"> </span>Saturday, November 16, 2013 8:09 AM<br>
<b>To:</b><span class="Apple-converted-space"> </span><a href="mailto:litmus-dev@lists.litmus-rt.org">litmus-dev@lists.litmus-rt.org</a><br>
<b>Subject:</b><span class="Apple-converted-space"> </span>Re: [LITMUS^RT] Question about GSN-EDF in Litmus</font>
<div> </div>
</div>
<div>Hi Zheng,
<div><br>
</div>
<div>The general structure of a typical litmus application looks like this:</div>
<div><br>
</div>
<div>init_litmus(); /* initialize litmus (basically just pins the programs memory to avoid page faults) */</div>
<div>set_rt_task_param(); /* set task params, such as period, relative deadline, execution time, etc. */</div>
<div>task_mode(LITMUS_RT_TASK); /* become a real-time task */</div>
<div>wait_for_ts_release(); /* wait for synchronous task set release—i.e., until liblitmus’s release_ts program is run */</div>
<div>while(running) { /* keep executing jobs until task should exit */</div>
<div> do_work(); /* do the actual work of a job */</div>
<div> sleep_next_period(); /* sleep until next job release */</div>
<div>}</div>
<div>task_mode(BACKGROUND_TASK); /* exit real-time mode */</div>
<div>exit(0);</div>
<div><br>
</div>
<div>You can take a look at liblitmus/bin/rtspin.c and liblitmus/bin/base_task.c for examples. (Note: Use of wait_for_ts_release() is optional. However, without it, you may want to swap the order of sleep_next_period() and do_work().)</div>
<div><br>
</div>
<div>The structure of your program is incorrect:</div>
<div><br>
</div>
<div>init_litmus();</div>
<div>set_rt_task_param();</div>
<div>task_mode(LITMUS_RT_TASK);</div>
<div>task_mode(BACKGROUND_TASK);</div>
<div>job();</div>
<div><br>
</div>
<div>Problems:</div>
<div>1) job() is not in a loop. (This would only be correct if you were doing real-time job shop scheduling.)</div>
<div>2) job() should be between task_mode(LITMUS_RT_TASK) and task_mode(BACKGROUND_TASK). You only need to call task_mode(LITMUS_RT_TASK) once per task, not once per job.</div>
<div><br>
</div>
<div>One last comment: It looks like you are reading the time stamp counter to trace start and finish times. This is fine in the correct context, but you can also use Litmus’s sched_trace logs to get more accurate information on job release times, completion
times, and many other events. In general, you have to be careful measuring times in userspace. For instance, you cannot measure job release times in userspace because a job may not be immediately scheduled when it is released (there might be higher-priority
work that needs to be scheduled first). Thus, a userspace release measurement would have an error of (time the job was first scheduled - true release time). It’s best if you use sched_trace logs to get accurate data.</div>
<div><br>
</div>
<div>-Glenn</div>
<div><br>
</div>
<div><br>
<div>
<div>On Nov 16, 2013, at 2:37 AM, Luo, Zheng <<a href="mailto:luozheng@wustl.edu">luozheng@wustl.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr" tabindex="0" style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; margin:0px">
<div style="margin-top:0px; margin-bottom:0px"><span style="font-size:12pt">Hi All</span><span style="background-color:rgb(255,255,255); font-family:Helvetica,Verdana,sans-serif; font-size:15.199999809265137px; font-weight:bold">,</span></div>
<div dir="ltr" style="color:rgb(40,40,40)">
<div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; margin:0px">
<div style="margin-top:0px; margin-bottom:0px"><span style="background-color:rgb(255,255,255); font-family:Helvetica,Verdana,sans-serif; font-size:15.199999809265137px; font-weight:bold"><br>
</span></div>
<div>
<div style="margin-top:0px; margin-bottom:0px"><font size="3">I am a master's student in Washington University who is doing research on realtime system. I installed Litmus because it has the global EDF scheduler. However when I do a simple experiment by using
it. I simply can not get the right result. The EDF scheduler acts like a round robing scheduler. I don't know where I did wrong. The Litmus I installed is <span style="background-color:rgb(255,255,255)">LITMUS-RT Version 2013.1.</span></font></div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div style="margin-top:0px; margin-bottom:0px">I put my source code as a attachment, and also the screenshot of the result. Hope you can help me with. Thank you very much. Looking forward to your reply.</div>
<div style="margin-top:0px; margin-bottom:0px"><br>
</div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; margin:0px">
Zheng Luo<br>
</div>
</div>
</div>
</div>
</div>
<span><Screenshot 2013-11-15 21:30:34.png></span><span><test_mt_task.c></span>_______________________________________________<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">https://lists.litmus-rt.org/listinfo/litmus-dev</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
_______________________________________________<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">https://lists.litmus-rt.org/listinfo/litmus-dev</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<span><base_mt_task.c></span><span><Screenshot 2013-11-19 10:40:24.png></span><span><st--0.bin></span><span><st--1.bin></span><span><st--2.bin></span><span><st--3.bin></span>_______________________________________________<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">https://lists.litmus-rt.org/listinfo/litmus-dev</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<span><config_ft_trace></span><span><config_liblitmus></span>_______________________________________________<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">https://lists.litmus-rt.org/listinfo/litmus-dev</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>