While studying linux scheduler i looked into strct sched_entity and update_curr function which accounts for how much time a process have run.
The code says that vruntime is incremented by a weighted value(total run time weighted against number of process) while sum_exec_runtime is incremented by how much time passed since last accounting.
Here's link for function's defintion
update_curr :
Linux/kernel/sched/fair.c - Linux Cross Reference - Free Electrons
__update_curr:
Linux/kernel/sched/fair.c - Linux Cross Reference - Free Electrons
My question if we increment vruntime by weighted value how can we be sure that this is the time for which the process ran so far?
I think sum_exec_runtime gives exactly what we are looking for.
Please correct me if i'm wrong or any explanation for clearing this concept.
thanks