kernel - I/O APIC external IRQ static distribution -


i'm reading ulk3, , got following statement

“interrupt requests coming external hardware devices can distributed among available cpus in 2 ways:

static distribution irq signal delivered local apics listed in corresponding redirection table entry. interrupt delivered 1 specific cpu, subset of cpus, or cpus atonce (broadcast mode).”

i know linux don't use static distribution question is:

if os init 1 entry of interrupt redirection table using static distribution, , irq raised , multi-apic system selects 2 of cpus (here, it's example 2 cpus listed in entry) , delivers signal corresponding local apic, , 2 local apics both accept interrupt.

  1. just 1 cpu handle interrupt? or both? if one, how select?
  2. is there os using static distribution?

if yes, please show me example

if no, why exist? because of historical issue? original reason of design?

here link describe mechanisms of local apic, io apic , icc bus.

http://syszux.com/book/kernel/understanding.the.linux.kernel(3rd%20edition)/understandlk-chp-4-sect-2.html

below paragraph extracted page might answer of question:

dynamic distribution

the irq signal delivered local apic of processor executing process lowest priority.

every local apic has programmable task priority register (tpr), used compute priority of running process. intel expects register modified in operating system kernel each process switch.

if 2 or more cpus share lowest priority, load distributed between them using technique called arbitration . each cpu assigned different arbitration priority ranging 0 (lowest) 15 (highest) in arbitration priority register of local apic.

every time interrupt delivered cpu, corresponding arbitration priority automatically set 0, while arbitration priority of other cpu increased. when arbitration priority register becomes greater 15, set previous arbitration priority of winning cpu increased 1. therefore, interrupts distributed in round-robin fashion among cpus same task priority.[*]


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -