[LITMUS^RT] [Litmus^RT]in Global EDF how to get the best cpu available

Björn Brandenburg bbb at mpi-sws.org
Tue Dec 12 19:19:54 CET 2017


> On 12. Dec 2017, at 07:20, sijili s <sijili.mec at gmail.com> wrote:
> 
> I want to search all the available CPUs and find the best one among them based on a criteria. According to my understanding, at present GSN_EDF uses the most recent used CPU for scheduling the released task.
> 
> If we need to search all the CPUs with their current status, where or in which module should I implement this operation. As I am new to Linux Kernel coding I am really stuck here.

LITMUS^RT’s GSN-EDF implementation can be found in litmus/sched_gsn_edf.c.

	https://github.com/LITMUS-RT/litmus-rt/blob/linux-4.9-litmus/litmus/sched_gsn_edf.c

The state maintained by the scheduler can be seen here:

	https://github.com/LITMUS-RT/litmus-rt/blob/4acc377593580e7d04ad8b42b258e8c2b39030ee/litmus/sched_gsn_edf.c#L108-L114

Understanding how the scheduler works and how one best goes about modifying it will take some time, but in the end it’s just a concurrent C program. So with some time spent studying it and the surrounding kernel you should be able to make sense of it. Unfortunately, there’s not much we can do to help here;  you’ll just have to study the code yourself. 

Regards,
Björn




More information about the litmus-dev mailing list