0

Why is there a for_each_sched_entity macro in task_tick_fair function called on system tick? According to me, only the run time characteristics of the current task should be updated. Why does it call entity_tick for the entire hierarchy of the current process?

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128

1 Answers1

0

CFS supports hierarchies of tasks, where entire subtrees can have their CPU usage accounting and quota aggregated. This features is used to implement cpu cgroups and CFS group scheduling. A interior node of the task tree can be thought of a as a virtual task than represents the CPU usage of its subtree.

Benjamin Peterson
  • 19,297
  • 6
  • 32
  • 39