开发者

core at which function is running

consider a kernel tasklet scheduled and executing the tasklet function.

Is there a way to know which core the tasklet is running ? I mean is there a function / variable to know at which core the tasklet is running at. Architecture i开发者_StackOverflow社区s arm.

Thanks!


A tasklet will always run on the same processor core that scheduled it. Inside the kernel, you can call smp_processor_id() to find out what processor you're currently running on.

Check /proc/cpuinfo for a mapping of processor number to physical id and core id. Hyperthreading will create 2 logical processors for each core.


See man 7 cpuset.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜