tech-kern archive

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

Re: RFC: IRQ affinity (aka interrupt routing)

Hi rmind,

(2014/07/27 1:18), Mindaugas Rasiukevicius wrote:
Kengo NAKAHARA <> wrote:
The implementation is consist of following three pathes:
     (2) new kernfs file to show interrupt numbers per cpu
         "vmstat -i" cannot show interrupt numbers per cpu. So I
         implement new kernfs file to show per cpu. The usage is "cat
         /kern/interrupts". For example, we can see below output
         which is like linux's /proc/interrupts
          IRQ      CPU#00          CPU#01
            1           0*              0
            3           0*              0
            4           0*              0
            6           0*              0
            7           0*              0
            9           0*              0
           12           0*              0
           14           0*              0
           15           0*              0
           16         108*              0
           17     1193055*              0
           18      680358             150*
         "*" mean the cpu is routed the IRQ number interrupts.

Agree with Martin that vmstat -i could grow per-CPU counters, but it might
be a bit more work than you want to do.  So, up to you. :)

I consider vmstat -i grow per-CPU counters after implementing intrctl(8).
It is no problem to change the output format of vmstat -i, doesn't it?


Above implementation works well, but I think the UI is not so good.
So, I am going to implement new command intrctl(8). The usage is consist
of below two sub command.
     (A) "intrctl list"
         This sub command show interrupt numbers per cpu (like

     (B) "intrctl -i 18 -c 1"
         This sub command let interrupts route other cpu. "18" is IRQ
         number, "1" is cpuid (like "sysctl -w kern.cpu_affinity.irq=18:1").

Could you comment which UI is good, current "sysctl and /kern/interrupts"
or new "intrctl"?

I do not really like /kern/interrupts.  intrctl(8) seems like a good
interface.  Note that cpuctl(8) has intr/nointr commands which are not
enabled at this moment.  They should move to intrctl(8).

intrctl(8) gain agreements with two developers, and It seems to gain more
agreements, maybe. So I approach to implement intrctl(8). Yes, you told
me the cpuctl(8) sub command at previous meeting :) I move cpuctl intr/
nointr sub comamnd to intrctl(8).


Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit


Home | Main Index | Thread Index | Old Index