且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在每个 CPU 上运行代码

更新时间:2022-12-04 08:29:52

您现在不需要在每个 cpu 上运行代码.您需要做的是安排,当离线 CPU 重新在线时,您的代码能够执行并启用对 PMU 的访问.

You don't need to run the code on every cpu right now. What you need to do is arrange so that when the offline cpus come back online, your code is able to execute and enable the access to the PMU.

实现这一目标的一种方法是使用 CPU 热插拔通知程序.

One way to achieve that would be with a cpu hotplug notifier.