Skip to contentSkip to conversation

PCI interrupt affinity

DISCUSSION Ashish Bijlani 4 participants 9 messages Oct 19, 2007 – Oct 22, 2007

lore
Share & tools
lore
#1 lore raw

Pin the interrupt to a particular VCPU via /proc/irq/#/affinity in the guest (probably dom0), and pin the vcpu to a physical cpu via xm vcpu-pin.

-- Keir

Quoted 5 lines · Ashish Bijlani

how to set affinity of an interrupt through PCI bus in xen so that the guests always get interrupt on a particular processor?

thanks.

Quoted 7 lines

-a

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

interrupt delivery to VCPU

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

#3 lore raw

Re: interrupt delivery to VCPU

The guest can choose which VCPU gets any particular interrupt. This is tied into Linux's normal irq affinity logic, for example.

-- Keir

Quoted 8 lines · Lomesh

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw

RE: interrupt delivery to VCPU

What happens for windows HVM guest?
Also for PV Linux guest do you know how does Linux setup irq affinity?

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, October 19, 2007 1:42 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

The guest can choose which VCPU gets any particular interrupt. This is tied
into Linux's normal irq affinity logic, for example.

-- Keir

Quoted 8 lines · Lomesh

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw

Re: interrupt delivery to VCPU

I don't know about the VT-d support. I doubt that's been optimised so much. I only know about physical IRQ delivery to PV guests. For Linux, a daemon (irqbalanced) usually periodically rebalances irqs by writing affinity info to /proc/irq/#/affinity.

-- Keir

Quoted 25 lines · Lomesh

What happens for windows HVM guest?
Also for PV Linux guest do you know how does Linux setup irq affinity?

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, October 19, 2007 1:42 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

The guest can choose which VCPU gets any particular interrupt. This is tied
into Linux's normal irq affinity logic, for example.

-- Keir

Quoted 8 lines · Lomesh

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw

RE: interrupt delivery to VCPU

Does anybody know how windows rebalances irqs among processors?

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Keir Fraser
Sent: Friday, October 19, 2007 1:49 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

I don't know about the VT-d support. I doubt that's been optimised so much.
I only know about physical IRQ delivery to PV guests. For Linux, a daemon
(irqbalanced) usually periodically rebalances irqs by writing affinity info
to /proc/irq/#/affinity.

-- Keir

Quoted 9 lines · Lomesh

What happens for windows HVM guest?
Also for PV Linux guest do you know how does Linux setup irq affinity?

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, October 19, 2007 1:42 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

Quoted 16 lines

The guest can choose which VCPU gets any particular interrupt. This is tied
into Linux's normal irq affinity logic, for example.

-- Keir

Quoted 8 lines · Lomesh

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#7 lore raw

RE: interrupt delivery to VCPU

Maybe windows uses IPI for forwarding interrupt to another processor?

Quoted 1 line

From my observation, SMP Windows XP handles RTC timer interrupt this way.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Agarwal, Lomesh
Sent: 2007年10月20日 5:51
To: Keir Fraser; [email protected]
Subject: RE: [Xen-devel] interrupt delivery to VCPU

Does anybody know how windows rebalances irqs among processors?

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Keir Fraser
Sent: Friday, October 19, 2007 1:49 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

I don't know about the VT-d support. I doubt that's been optimised so much.
I only know about physical IRQ delivery to PV guests. For Linux, a daemon
(irqbalanced) usually periodically rebalances irqs by writing affinity info
to /proc/irq/#/affinity.

-- Keir

Quoted 9 lines · Lomesh

What happens for windows HVM guest?
Also for PV Linux guest do you know how does Linux setup irq affinity?

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, October 19, 2007 1:42 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

Quoted 16 lines

The guest can choose which VCPU gets any particular interrupt. This is tied
into Linux's normal irq affinity logic, for example.

-- Keir

Quoted 8 lines · Lomesh

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw

RE: interrupt delivery to VCPU

Does it make sense to change interrupt delivery to VCPU which is going to be runnable next so that interrupt latency can be minimized for HVM guest?

-----Original Message-----
From: Shan, Haitao
Sent: Saturday, October 20, 2007 6:05 PM
To: Agarwal, Lomesh; Keir Fraser; [email protected]
Subject: RE: [Xen-devel] interrupt delivery to VCPU

Maybe windows uses IPI for forwarding interrupt to another processor?

Quoted 1 line

From my observation, SMP Windows XP handles RTC timer interrupt this way.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Agarwal, Lomesh
Sent: 2007年10月20日 5:51
To: Keir Fraser; [email protected]
Subject: RE: [Xen-devel] interrupt delivery to VCPU

Does anybody know how windows rebalances irqs among processors?

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Keir Fraser
Sent: Friday, October 19, 2007 1:49 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

I don't know about the VT-d support. I doubt that's been optimised so much.
I only know about physical IRQ delivery to PV guests. For Linux, a daemon
(irqbalanced) usually periodically rebalances irqs by writing affinity info
to /proc/irq/#/affinity.

-- Keir

Quoted 9 lines · Lomesh

What happens for windows HVM guest?
Also for PV Linux guest do you know how does Linux setup irq affinity?

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, October 19, 2007 1:42 PM
To: Agarwal, Lomesh; [email protected]
Subject: Re: [Xen-devel] interrupt delivery to VCPU

Quoted 16 lines

The guest can choose which VCPU gets any particular interrupt. This is tied
into Linux's normal irq affinity logic, for example.

-- Keir

Quoted 8 lines · Lomesh

How does Xen deliver an interrupt to VCPU? If there are 2 VCPUs for a guest and there is no interrupt affinity set which VCPU will get the interrupt? is it round robin?

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel