<div dir="ltr">Hi all,<div><br></div><div>I am trying to learn CFS. I came across this variable.</div><div><br></div><div>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. </div>

<div><br></div><div>But I am not able to understand why we need that variable and how it is used for </div><div>1. new added tasks</div><div>2. Tasks that wake up after sleep.</div><div>I tried learning from professional linux kernel architecture+utlk and alike. But I am not able to understand.</div>
<div><br></div><div>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??</div><div><br></div><div>
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.</div>
<div><br></div><div>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!!!</div><div><br></div><div>Anup</div>
<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>