Suixianglu (about SMP load balancing)

1165 people read comment(0) Collection Report

Copyright, welcome to reprint, please do not use for commercial purposes. Contact box: feixiaoxing]

For each house SoC design, SMP is an essential basic function. This year, who said if their home SOC is not SMP, it seems like nabuchushou. Fortunately, arm for everyone to prepare a lot of programs, from the early dual core, to now the quad core, eight core, and so on, a small chip performance is more and more high. Of course, since it is a multi-core, so how to do the load balancing, so that each core is not idle, this is the software engineer's work. Before turning over the 2.6.16 Linux kernel code, there are some basic ideas, here to share with you.

1) task initialization to create the need to find the most idle CPU to run;

2) a task to be awakened when need to find the most idle CPU to deal with;

3) when a schedule in the core scheduling found that they have no task can be called when the need for load balancing;

4) when a idle has core, then it needs to apply for a regular request from the other core to see if you can find some work to do.

Load balancing is simple, but it is difficult to operate. For example, how to set the timer? Time is too long, can not reach the effect of a balanced load; the time is too short, CPU to deal with IPI interrupt, not enough time to deal with task. Again, for example, the scheduling of the time, some of the task if they have their own fixed core binding how to do? Or, some task frequently in different core running, causing cache L1 constantly refresh, reduce the CPU running speed how to do? These are the need for software developers to be carefully designed to solve.

Of course, no one is perfect, and Linux is the same. Real effect, in fact, need to do their own experiments to verify the developer is good.

Welcome to put forward their own balanced load scheme. ^_^

step on
Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • Visit2709734 times
    • Integral:Twenty-nine thousand six hundred and five
    • Grade
    • Rank:Ninety-ninth name
    • Original332
    • Reproduced:1
    • Translation:0
    • Comments:2376 article
    Latest comments