[LITMUS^RT] How can I set total number of cores on G-EDF algorithm

Davide Compagnin dcompagn at gmail.com
Mon Dec 23 09:14:40 CET 2013


Hi Luo, a possibility is to change the max number of processors in the
kernel configuration file.
Il 22/dic/2013 18:59 "Luo, Zheng" <luozheng at wustl.edu> ha scritto:

>  Hi everyone,
>
>  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.
>
>  1***
> 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 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:
>
>  CALL( init_rt_thread() );
> int cluster = 0;
> int cluster_sz = 4;
> be_migrate_to_cluster(cluster, cluster_sz);
> param.cpu   = cluster_to_first_cpu(cluster, cluster_sz);
> CALL( set_rt_task_param(gettid(), &param) );
>
>  I tried different number of the cluster and cluster_sz, when I used the
> different number, I did the  method said in the website: C-EDF plugin
> must be reloaded (for example by switching to the Linux plugin and back
> to C-EDF). 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.
>
>  2***
> Second, I tried to use the G-EDF by disabling the cores in the linux
> system. I used:
>  sudo echo "0" > /sys/devices/system/node/node0/cpu1/online
> sudo echo "0" > /sys/devices/system/node/node0/cpu3/online
>  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.
>
>  3***
> Third, I used the Native Linux user-space command to set the number of
> cores, by using
>  cpu_set_t mask;
> CPU_ZERO(&mask);
> for (unsigned i = first_core; i <= last_core; ++i) {
> CPU_SET(i, &mask);
> }
> sched_setaffinity( 0 , sizeof(mask), &mask);
>  Then I run the experiment, and I will get same result as #1 method, it
> seems that G-EDF ignored the CPU mask setting.
>
>  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? I
> think I truly need some help now. Thank you very much. Looking forward to
> your reply.
>
>
>  Zheng Luo
>
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20131223/39beacbc/attachment.html>


More information about the litmus-dev mailing list