<p dir="ltr">Hi Luo, a possibility is to change the max number of processors in the kernel configuration file.</p>
<div class="gmail_quote">Il 22/dic/2013 18:59 "Luo, Zheng" <<a href="mailto:luozheng@wustl.edu">luozheng@wustl.edu</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div name="divtagdefaultwrapper" style="font-size:12pt;margin:0;font-family:Calibri,Arial,Helvetica,sans-serif">
<div style><font color="#282828">Hi everyone,</font></div>
<div style><font color="#282828"><br>
</font></div>
<div style><font color="#282828">I want to use arbitrary number of cores to do run the global EDF. I tried several method, however none of them works for me. I think I truly need some help now.</font></div>
<div style><br>
</div>
<div style>1***</div>
<div style><font color="#282828">First, I tried the C-EDF, I think I can group the cores that will be used in the experiment to a cluster and the unused cores to a cluster. However, I read the documentation on the website,
it showed how to </font><font color="#282828" size="3">use the L1,L2,L3 and ALL to do the division. I choose the parameter ALL, and run the experiment by choosing the ./setsched C_EDF. In the base_mt_task.c , I added:</font></div>
<div style><font color="#282828" size="3"><br>
</font></div>
<div style><font color="#282828" size="3">
<div>CALL( init_rt_thread() );</div>
<div>int cluster = 0;</div>
<div>int cluster_sz = 4; </div>
<div>be_migrate_to_cluster(cluster, cluster_sz);</div>
<div>param.cpu = cluster_to_first_cpu(cluster, cluster_sz);</div>
<div>CALL( set_rt_task_param(gettid(), ¶m) );</div>
</font></div>
<div style><font size="3" color="#282828"><br>
</font></div>
<div style><font size="3" color="#282828">I tried different number of the cluster and cluster_sz, when I used the different number, I did the method said in the website: </font><font face="Calibri, Arial, Helvetica, sans-serif" size="3"><tt>C-EDF</tt> plugin
must be reloaded (for example by switching to the <tt>Linux</tt> plugin and back to <tt>C-EDF). </tt></font><font size="3">When I see the cpu utilization by run top -1, all 8 cores are being used. I get very confused here.
I don't know where I did wrong. I send the screenshot as an attachment. I also send the base_mt_task.c as an attachment too.</font></div>
<div style><br>
</div>
<div style>2***</div>
<div style><font size="3" color="#282828">Second, I tried to use the G-EDF by disabling the cores in the linux system. I used: </font></div>
<div style>
<div>sudo echo "0" > /sys/devices/system/node/node0/cpu1/online</div>
<div>sudo echo "0" > /sys/devices/system/node/node0/cpu3/online</div>
</div>
<div style><font color="#282828" size="3">Those command did disable the CPU cores, however the G-EDF seems not working correctly. The execution order of the rt_thread, seems not according to the G-EDF. Some of the late
deadline thread, even finished early. I am really confused here.</font></div>
<div style><span style="color:rgb(40,40,40);font-size:medium"><br>
</span></div>
<div style><span style="color:rgb(40,40,40);font-size:medium">3***</span></div>
<div style><font color="#282828" size="3">Third, I used the Native Linux user-space command to set the number of cores, by using </font></div>
<div style>
<div><font color="#282828" size="3">cpu_set_t mask;</font></div>
<div><font color="#282828" size="3">CPU_ZERO(&mask);</font></div>
<div><font color="#282828" size="3">for (unsigned i = first_core; i <= last_core; ++i) </font><span style="color:rgb(40,40,40);font-size:medium">{</span></div>
<div><font color="#282828" size="3"><span style="white-space:pre-wrap"></span>CPU_SET(i, &mask);</font></div>
<div><font color="#282828" size="3">}</font></div>
<div><span style="color:rgb(40,40,40);font-size:medium">sched_setaffinity( 0 , sizeof(mask), &mask);</span></div>
</div>
<div style><span style="color:rgb(40,40,40);font-size:medium">Then I run the experiment, and I will get same result as #1 method, it seems that G-EDF ignored the CPU mask setting.</span></div>
<div style><span style="color:rgb(40,40,40);font-size:medium"><br>
</span></div>
<div style><font color="#282828" size="3">I tired those three method, however none of them worked. Or is there any better idea to specify the number of online cores to run the experiment? </font><span style="font-size:12pt;color:rgb(40,40,40)">I
think I truly</span><span style="font-size:12pt;color:rgb(40,40,40)"> need some help now. Thank you very much. Looking forward to your reply.</span></div>
<div style><font color="#282828"><br>
</font></div>
<div style><font color="#282828"><br>
</font></div>
<div style><font color="#282828">Zheng Luo</font></div>
</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>