From mboxrd@z Thu Jan 1 00:00:00 1970 From: xerofoify@gmail.com (Nicholas Krause) Date: Sun, 08 Mar 2015 18:03:32 -0400 Subject: Get local CPU id In-Reply-To: <20150308214900.GN5085@lukather> References: <20150308214900.GN5085@lukather> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On March 8, 2015 5:49:00 PM EDT, Maxime Ripard wrote: >On Sun, Mar 08, 2015 at 10:06:23PM +0300, Matwey V. Kornilov 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? > >To answer strictly your question, like Nick said, smp_processor_id() >will work fine. > >However, you can do exactly what you want be reading /proc/interrupts, >that already provide the informations you are looking for. > >Maxime Good point, I totally forgot about that file in the proc directory. ? That was my fault. Nick -- Sent from my Android device with K-9 Mail. Please excuse my brevity.