# 2.8.6 总结

负载均衡是充分利用多核CPU的重要算法，本文只是粗略地介绍了算法的总体思路，意在为读者搭建一个大致框架，还有很多内容并没有提及，例如：

* 任务放置 创建新任务、唤醒新任务时如何根据各个CPU的负载情况选择合适的目标CPU来执行任务
* EAS(Energy Aware Scheduling) 系统会充分考虑CPU 能耗来做进一步的决策，详细内容可以参考：<https://docs.kernel.org/scheduler/sched-energy.html>
* 统计信息

具体实现中还涉及到很多细节，例如如何计算算力、如何最快地选择目标CPU等等，读者如果还想深入，可以参考资源列表及内核源码。

**参考资料：**

* <https://www.kernel.org/doc/html/latest/scheduler/sched-domains.html>
* <https://www.kernel.org/doc/html/latest/scheduler/sched-capacity.html>
* <https://lwn.net/Articles/80911/>
* <https://cdmana.com/2021/05/20210513160921291a.html>
* <http://www.wowotech.net/process\\_management/load\\_balance\\_detail.html>
* <http://tjpm.blog.chinaunix.net/uid-23141914-id-5767451.html>
* <https://pwl999.github.io/2017/12/16/linux\\_scheduler/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://s3.shizhz.me/linux-sched/lb/lb-summary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
