Re: Get local CPU id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On March 8, 2015 3:06:23 PM EDT, "Matwey V. Kornilov" <matwey.kornilov@xxxxxxxxx> wrote:
>Hi,
>
>I would like to somehow obtain local CPU core ID in the interrupt
>handler function. I want to see how my interruptions are distributed
>among different CPU cores under different conditions.
>
>How should I do that?
>
>
I didn't remember off hand but looked into the scheduler code where this is common.  When I looked there the marco, smp_professor_id in the file include/linux/smp. h seems to be the best way to handle your task. The only concern and I am pretty certain it is, is if this marco is
able to work in interrupt context a.k.a it is guaranteed to  never sleep. You can either test this out and see if the system hangs or do more research into what functions and marcos work interrupt context. 
Hope this helps, 
Nick 
>_______________________________________________
>Kernelnewbies mailing list
>Kernelnewbies@xxxxxxxxxxxxxxxxx
>http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux