views:

51

answers:

2

hi, 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 is arm.

Thanks!

A: 

See man 7 cpuset.

msw
This isn't correct, as tasklets are not processes or threads.
Eric Seppanen
+1  A: 

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.

Eric Seppanen