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