79467152

Date: 2025-02-25 16:07:21
Score: 1
Natty:
Report link

The CFS scheduler uses an rbtree as it runqueue, so the leftmost node has the lowest vruntime and will be scheduled next. If you put a new process in that tree, you have to make content fairly with the others. This is done by setting it's vruntime on the creation to the lowest vruntime in the tree. CFS tracks that number in its struct as rq->cfs.min_vruntime

As the documentation states:

CFS also maintains the rq->cfs.min_vruntime value, which is a monotonic increasing value tracking the smallest vruntime among all tasks in the runqueue. The total amount of work done by the system is tracked using min_vruntime; that value is used to place newly activated entities on the left side of the tree as much as possible.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Panagiotis Stefanis