Recently I am playing with the linux task scheduler.
Now I wan to find out the load balancing mechanism of the task scheduler and CFS algorithm. First, I have found in the __schedule() function idle_balance(cpu, rq) is called which try to do some load balancing if the current runqueue is empty.
Then I also found in the core.c file there is a function scheduler_tick() which seems to be called periodically, update rq and other data structures and also do the load balancing ( calling function trigger_load_balance(rq, cpu)). Am I right? But how does the scheduler_tick() work? Where is the timer? I know the CFS not tick-based.So probably there is a timer created after the boot which will call scheduler_tick() periodically?
This seems to be a naive question but I am a rookie to the linux system now.
It’s fired by an interrupt request generated at intervals by the system timer. 1