I am understanding the implementation of CFS in the Linux kernel. My doubt is when the CFS calculates the ideal time for each task in a given epoch and a ideal time of a task is lower than min_granularity. What place in the code can I find the checking this scenario?
Assume the target latency is 6 miliseconds (ms) and the miminum granularity is 0.75 ms (this is default values) and two runnable tasks. One of them (task 0) has a nice -20 (weight 88761) and other (task 1) has a nice 0 (weight 1024).
The ideal time of task 0 is 5.93 ms ((88761/(88761+1024))*6) and the ideal time of task 1 is 0.068 ms ((1024/(88761+1024))*6). The calculation is done by the function *check_preempt_tick* in each interrupt tick.
The ideal time of task 1 is lower than min_granularity. If CFS assigns min_granularity to task 1, the target latency is larger than 6 ms. Do you know how to work CFS in this situation?
Thanks in advance