Completely Fair Scheduler - Min_vruntime

Anup Buchke anup.estuff at gmail.com
Sat Mar 1 10:52:36 EST 2014


Hi all,

I am trying to learn CFS. I came across this variable.

min_vruntime : kernel documentation says it stores the total work done by
the system . AND it is used to add new tasks more to the left in the rbtree
so that they are scheduled quickly.

But I am not able to understand why we need that variable and how it is
used for
1. new added tasks
2. Tasks that wake up after sleep.
I tried learning from professional linux kernel architecture+utlk and
alike. But I am not able to understand.

Also the key in the rbtree is used as (current_vruntime - min_vruntime) ?
why are we even using such formule in which we subtract min_vruntime which
is monotonically increasing??

I think it is related to some latency period and the processes which runs
in one latency period. I think I may be missing some of the core concepts
on scheduling process, but not able to figure out what I am missing.

My understanding is pretty messed up the use of min_vruntime. I would be
highly grateful if someone could explain me in bit of a detail about my
answer. Thanks in Advance!!!

Anup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140301/6fd8365e/attachment.html 


More information about the Kernelnewbies mailing list