<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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">
<div style="background-color: rgb(255, 255, 255);"><font color="#282828">Hi everyone,</font></div>
<div style="background-color: rgb(255, 255, 255);"><font color="#282828"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);"><br>
</div>
<div style="background-color: rgb(255, 255, 255);">1***</div>
<div style="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);"><font color="#282828" size="3"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);"><font size="3" color="#282828"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255);"><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 class="backtick">C-EDF</tt> plugin
must be reloaded (for example by switching to the <tt class="backtick">Linux</tt> plugin and back to <tt class="backtick">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="background-color: rgb(255, 255, 255);"><br>
</div>
<div style="background-color: rgb(255, 255, 255);">2***</div>
<div style="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);">
<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="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);"><span style="color: rgb(40, 40, 40); font-size: medium;"><br>
</span></div>
<div style="background-color: rgb(255, 255, 255);"><span style="color: rgb(40, 40, 40); font-size: medium;">3***</span></div>
<div style="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);">
<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 class="Apple-tab-span" style="white-space:pre"></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="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);"><span style="color: rgb(40, 40, 40); font-size: medium;"><br>
</span></div>
<div style="background-color: rgb(255, 255, 255);"><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="background-color: rgb(255, 255, 255);"><font color="#282828"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255);"><font color="#282828"><br>
</font></div>
<div style="background-color: rgb(255, 255, 255);"><font color="#282828">Zheng Luo</font></div>
</div>
</body>
</html>