How to understand sched_period in the cfs schedule class?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux