开发者

Can "num_online_cpus()" return different values in the same run?

The name is suggesting it. If there are online cpus, are there offline cpus? can a offline cpu become online and vice versa?

Thanks in advance. 开发者_JAVA百科R.g.


Yes -- some architectures support "hot-pluggable CPUs":

http://www.kernel.org/doc/Documentation/cpu-hotplug.txt

Hardware that actually supports this is rare as hen's teeth, though.


it seems that online in this context means "available for scheduling" and based on what i read in include/linux/cpumask.h where num_online_cpus() is defined. i'd think it would be possible for it to return different values at different times but in any stable system i don't think it would commonly do so.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜