I know currently Linux kernel is using CFS as the scheduler and I know the code is located in kernel/sched/fair.c.
I checked the file "fair.c" but I didn't find any part is assigning tasks to different cpu so I'm wondering is there part or other code that are working for load balancing or coordinate cores work together?
Thank you.
All the code related to load-balancing with CFS is in fair.c. Look for "struct lb_env" that'll show you the source and destination cpus for a task.