As far as I understand, __sched_period is the time incurred in making the task 
runnable again(the period  making sure each process have a chance to run). When 
the processes are less than sched_nr_latency, the CFS scheduler splits time 
into periods in which each process is anticipated to run once.

u64 __sched_period(unsigned long nr_running)
{
    if (unlikely(nr_running > sched_nr_latency))
        return nr_running * sysctl_sched_min_granularity;
    else
        return sysctl_sched_latency;
}


  1.  Does each process have a maximum of 'sysctl_sched_latency/2' time to run 
or do we have to perform 'sysctl_sched_latency/2' for each process if we have 
two processes with the same weight?
  2.  What about context switching time, scheduler cost calculation, and other 
factors? What does the sched_period consist of? What is the meaning of 
sched_period?


More details here:
https://stackoverflow.com/questions/71480711/how-to-understand-sched-period-in-the-cfs-schedule-class

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to