Welcome! Log In Create A New Profile


How Does Linux CFS Scheduler Define Domains and Groups?

Posted by simonwan 
Hi Experts,

I'm currently learning the source code of Linux kernel CFS.

I know the load balancing is based on the schedule domains(sd) and schedule groups(sg). However, I'm wondering, for a given core, how does the system know which sd and sg the core belongs to. Is there any code works for this purpose?

Also, I found that in the kernel/sched/fair.c there is a function sg_imbalanced:
static inline int sg_imbalanced(struct sched_group *group)
    return group->sgc->imbalance;
This function could decide a group is imbalance or not. However, I can't find any function that updates the variable sgc->imbalance so I want to know which code is responsible for updating this attribute for the groups.

Thank you in advanced.


Your Email:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 16 plus 15?