Skip to contentSkip to conversation

Affined IRQs.

parisc-linux Naresh 4 participants 7 messages Aug 11, 2003

lore
Share & tools
lore

Naresh

author
#0 lore raw

Hi,
The IA-64 Linux kernel has a concept of affined IRQs, wherein IRQs can be bound/affined to particular CPUs. The affinity information shows up in '/proc/irq/#/smp_affinity'. I cannot see any affinity of IRQs to CPUs in PA ( iosapic.c and irq.c).. Is my understanding correct? Regards,
Naresh.

#1 lore raw
Quoted 7 lines · On Mon, 11 Aug 2003 12:24:10 +0530 Naresh <[email protected]> wrote:

Hi,
The IA-64 Linux kernel has a concept of affined IRQs, wherein IRQs can be bound/affined to particular CPUs. The affinity information shows up in '/proc/irq/#/smp_affinity'. I cannot see any affinity of IRQs to CPUs in PA ( iosapic.c and irq.c).. Is my understanding correct? Regards,
Naresh.

This has to be implemented for parisc and is on my todo list ;)

(BTW, on vacation till Aug 25th.)

Thibaut VARENE
The PA/Linux ESIEE Team
http://pateam.esiee.fr/

author
#2 lore raw

A couple of questions:
1. Do does this mean interrupts can go to any CPU?
2. If a CPU on an SMP system is stopped or its interrupts are blocked, will its interrupts automatically be serviced on another online CPU, due to their non-affining nature?
Regards,
Naresh.

Quoted 19 lines · Thibaut VARENE
Quoted 7 lines

Hi,
The IA-64 Linux kernel has a concept of affined IRQs, wherein IRQs can be bound/affined to particular CPUs. The affinity information shows up in '/proc/irq/#/smp_affinity'. I cannot see any affinity of IRQs to CPUs in PA ( iosapic.c and irq.c).. Is my understanding correct? Regards,
Naresh.

This has to be implemented for parisc and is on my todo list ;)

(BTW, on vacation till Aug 25th.)

Thibaut VARENE
The PA/Linux ESIEE Team
http://pateam.esiee.fr/
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#3 lore raw

Le lundi, 11 ao=FB 2003, =E0 14:33 Europe/Paris, Naresh a =E9crit :

Quoted 2 lines

A couple of questions:
1. Do does this mean interrupts can go to any CPU?

there are several cases, depending on the hardware.
For instance, on A500, IRQs are distributed to both CPUs, on J5000,=20 only one of the two CPUs gets all IRQs.
This is IOSAPIC programmation that has to be reviewed:

on J5000:
[varenet@k2000 ~]$ uname -a
Linux k2000 2.4.20-pa18 #1 SMP Sun Jan 12 02:41:51 CET 2003 parisc64=20 GNU/Linux
[varenet@k2000 ~]$ cat /proc/interrupts
CPU00 CPU01

 64: 1053803311 1053803113      PARISC-CPU  timer
 65:    2598316   12633504      PARISC-CPU  IPI
 66:   68320843          0      PARISC-CPU  IO-SAPIC00-L2
 67:          0          0      PARISC-CPU  IO-SAPIC00-L3
 68:        326          0      PARISC-CPU  IO-SAPIC00-L0
 69:          0          0      PARISC-CPU  IO-SAPIC00-L1
 70:    6616979          0      PARISC-CPU  IO-SAPIC00-L1
128:        326          0      IO-SAPIC00  SuperIO
129:    6616979          0      IO-SAPIC00  sym53c8xx, sym53c8xx
130:   68320843          0      IO-SAPIC00  eth0
195:        323          0         SuperIO  serial
199:          3          0         SuperIO  ide0

on A500:
[varenet@mkhppa3 ~]$ uname -a
Linux mkhppa3 2.4.20-pa28 #1 SMP Sun Mar 9 23:56:53 CET 2003 parisc64=20 GNU/Linux
[varenet@mkhppa3 ~]$ cat /proc/interrupts
CPU00 CPU01

 64:  727337429  727336565      PARISC-CPU  timer
 65:   31826972   39174091      PARISC-CPU  IPI
 66:   42581516          0      PARISC-CPU  IO-SAPIC00-L0
 67:          0         30      PARISC-CPU  IO-SAPIC00-L1
 68:          0          0      PARISC-CPU  IO-SAPIC00-L2
 69:          0     696338      PARISC-CPU  IO-SAPIC00-L2
 70:    3672511          0      PARISC-CPU  IO-SAPIC00-L3
 71:          0        209      PARISC-CPU  IO-SAPIC00-L4
 72:          0          0      PARISC-CPU  IO-SAPIC00-L5
128:   42581516          0      IO-SAPIC00  eth0
129:          0         30      IO-SAPIC00  sym53c8xx
130:          0     696338      IO-SAPIC00  sym53c8xx, sym53c8xx
131:    3672511          0      IO-SAPIC00  sym53c8xx
132:          0        209      IO-SAPIC00  serial
Quoted 7 lines

2. If a CPU on an SMP system is stopped or its interrupts are blocked,=20=

will
its interrupts automatically be serviced on another online CPU, due to=20=

their
non-affining nature?

CPU deconfiguration is also on my todo list ;)
So you can't stop a CPU on a PARISC SMP system atm.
the second part of the question is an iodood (Grant Grundler ;)=20 question, but to my understanding IRQs won't probably be serviced by=20 another CPU unless the IOSAPIC is reprogrammed to do so.

HTH,

Thibaut VARENE
The PA/Linux ESIEE Team
http://pateam.esiee.fr/

Quoted 33 lines

Regards,
Naresh.

Quoted 25 lines · Thibaut VARENE
Quoted 6 lines

Hi,
The IA-64 Linux kernel has a concept of affined IRQs, wherein IRQs=20=

can
be bound/affined to particular CPUs. The affinity information shows=20=

Quoted 7 lines

up
in '/proc/irq/#/smp_affinity'. I cannot see any affinity of IRQs to=20=

CPUs
in PA ( iosapic.c and irq.c).. Is my understanding correct? Regards,
Naresh.

This has to be implemented for parisc and is on my todo list ;)

(BTW, on vacation till Aug 25th.)

Thibaut VARENE
The PA/Linux ESIEE Team
http://pateam.esiee.fr/
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#4 lore raw
Quoted 2 lines · Thibaut VAR?NE

For instance, on A500, IRQs are distributed to both CPUs, on J5000, only one of the two CPUs gets all IRQs.

I'm pretty sure this is a bug in the j5000 (Legacy PDC) init sequence. Not a limitation of the j5000 HW.

Quoted 2 lines

but to my understanding IRQs won't probably be serviced by another CPU unless the IOSAPIC is reprogrammed to do so.

correct.

grant

#5 lore raw
In reply to Naresh
Quoted 2 lines · Naresh

A couple of questions:
1. Do does this mean interrupts can go to any CPU?

Interrupts can be direct at any one CPU.
ia64 and parisc IPI use the same method as IO devices.

The code does a round-robin when assigning IO interrupts to CPUs. ie assign interrupts to a sequential order of the CPUs.

A minor improvement would be to round-robin based on device class. But I want this intelligence in user space, not the kernel. NUMA machines want interrupts directed at CPUs in the same node where the IO is "hosted".

Quoted 2 lines

2. If a CPU on an SMP system is stopped or its interrupts are blocked, will its interrupts automatically be serviced on another online CPU,

no. The interrupt must be "manually" redirected to another CPU.

Quoted 1 line

due to their non-affining nature?

Not sure what you mean here.

grant

Quoted 29 lines

Regards,
Naresh.

Quoted 12 lines · Thibaut VARENE
Quoted 7 lines

Hi,
The IA-64 Linux kernel has a concept of affined IRQs, wherein IRQs can be bound/affined to particular CPUs. The affinity information shows up in '/proc/irq/#/smp_affinity'. I cannot see any affinity of IRQs to CPUs in PA ( iosapic.c and irq.c).. Is my understanding correct? Regards,
Naresh.

This has to be implemented for parisc and is on my todo list ;)

(BTW, on vacation till Aug 25th.)

Quoted 7 lines

Thibaut VARENE
The PA/Linux ESIEE Team
http://pateam.esiee.fr/
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#6 lore raw
Quoted 11 lines · Grant Grundler

Interrupts can be direct at any one CPU.
ia64 and parisc IPI use the same method as IO devices.

The code does a round-robin when assigning IO interrupts to CPUs. ie assign interrupts to a sequential order of the CPUs.

A minor improvement would be to round-robin based on device class. But I want this intelligence in user space, not the kernel. NUMA machines want interrupts directed at CPUs in the same node where the IO is "hosted".

Quoted 8 lines
Quoted 2 lines

2. If a CPU on an SMP system is stopped or its interrupts are blocked, will its interrupts automatically be serviced on another online CPU,

no. The interrupt must be "manually" redirected to another CPU.

Quoted 1 line

due to their non-affining nature?

Not sure what you mean here.

I think there's some confusion here. I would say that interrupts on PA-RISC are strongly CPU-affine, but there is currently no mechanism for controlling that affinity. One interrupt will always go to the CPU it's been programmed for.

Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk