Damon's Blog

The magic you are looking for is in the work you're avoiding.

Gems

2026

February

  • 2: Linux中的CFS调度器是如何一步步发明出来的arrow-up-right

    1. looping through the tasks

    2. looping through the tasks with priority

    3. looping through the tasks with quota and heuristic priority

    4. CFS: Completely Fair Scheduler

      • check the task with the smallest virtual runtime, and run it for a small time slice, then update its virtual runtime and put it back to the red-black tree.

      • use the nic value to adjust the virtual runtime of a task, thus adjusting its priority.

      • IO bounding tasks will have smaller virtual runtime, thus higher priority, and CPU bound tasks will have larger virtual runtime, thus lower priority.

January

Contacts

LinkedIn
LinkedIn

Last updated