除了使用亲和力掩码之外,如何在 Linux 中找到线程亲和力?
我们有一个运行 SMP Linux (2.6.18) 的嵌入式 MIPS 2 核处理器。
我们计划将主 GUI 线程的亲和力分配给两个核心之一,另一个核心用于驱动程序/数据路径处理。
然而,有人提出的问题是如何判断哪些线程位于哪个核心上?
我可以很好地获得亲和力掩码,但是有没有其他方法可以告诉(例如/proc系统)哪些线程位于哪个核心上?
谢谢。
We have an embedded MIPS 2-core processor running SMP Linux (2.6.18).
We are planning to assign the affinity of the main GUI threads to one of the two cores, and the other core used for driver/data path processing.
However, the questions has been asked of how do you tell which threads are on which core?
I can get the affinity mask fine, but is there any other way of telling (e.g. /proc system) which threads are on which core?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sched_getcpu - 确定调用线程正在其上运行的CPU
sched_getcpu - determine CPU on which the calling thread is running