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.
精彩评论