Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-28 Thread Oren Twaig
Hi Andi, On 04/27/2014 09:34 PM, Andi Kleen wrote: > Again, what lock protects it? > > If you cannot answer that question you likely shouldn't use static. The only function which touches this variable is vsmp_init() which is an "_init" function which is guarantee to run by a single cpu - this

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-28 Thread Oren Twaig
Hi Andi, On 04/27/2014 09:34 PM, Andi Kleen wrote: Again, what lock protects it? If you cannot answer that question you likely shouldn't use static. The only function which touches this variable is vsmp_init() which is an _init function which is guarantee to run by a single cpu - this means,

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Andi Kleen
On Sun, Apr 27, 2014 at 09:57:59AM +0300, Oren Twaig wrote: > Hi Andi, > > On 04/25/2014 05:22 PM, Andi Kleen wrote: > >> +static int irc = 1; > > Using a static for such state is very unusual. You need to describe what > > protects it against races and why that is needed over a cleaner solution.

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Ingo Molnar
* Oren Twaig wrote: > Hi Andi, > > On 04/25/2014 05:22 PM, Andi Kleen wrote: > >> +static int irc = 1; > > > > Using a static for such state is very unusual. You need to > > describe what protects it against races and why that is needed > > over a cleaner solution. > > The only reason I've

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Ingo Molnar
* Oren Twaig wrote: > Hi Ingo, > > On 04/26/2014 09:09 AM, Ingo Molnar wrote: > > I still don't see a clear explanation of what the _user_ saw and sees > > before and after the change. What is the effect of the patch: correct > > IRQ routing (i.e. before the change IRQs would end up on the

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Oren Twaig
Hi Andi, On 04/25/2014 05:22 PM, Andi Kleen wrote: >> +static int irc = 1; > Using a static for such state is very unusual. You need to describe what > protects it against races and why that is needed over a cleaner solution. The only reason I've used a static variable is because I wanted to

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Oren Twaig
Hi Ingo, On 04/26/2014 09:09 AM, Ingo Molnar wrote: > I still don't see a clear explanation of what the _user_ saw and sees > before and after the change. What is the effect of the patch: correct > IRQ routing (i.e. before the change IRQs would end up on the wrong > CPU), lower overhead IRQ

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Andi Kleen
On Sun, Apr 27, 2014 at 09:57:59AM +0300, Oren Twaig wrote: Hi Andi, On 04/25/2014 05:22 PM, Andi Kleen wrote: +static int irc = 1; Using a static for such state is very unusual. You need to describe what protects it against races and why that is needed over a cleaner solution. The

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Oren Twaig
Hi Ingo, On 04/26/2014 09:09 AM, Ingo Molnar wrote: I still don't see a clear explanation of what the _user_ saw and sees before and after the change. What is the effect of the patch: correct IRQ routing (i.e. before the change IRQs would end up on the wrong CPU), lower overhead IRQ routing

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Oren Twaig
Hi Andi, On 04/25/2014 05:22 PM, Andi Kleen wrote: +static int irc = 1; Using a static for such state is very unusual. You need to describe what protects it against races and why that is needed over a cleaner solution. The only reason I've used a static variable is because I wanted to avoid

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Ingo Molnar
* Oren Twaig o...@scalemp.com wrote: Hi Ingo, On 04/26/2014 09:09 AM, Ingo Molnar wrote: I still don't see a clear explanation of what the _user_ saw and sees before and after the change. What is the effect of the patch: correct IRQ routing (i.e. before the change IRQs would end up on

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-27 Thread Ingo Molnar
* Oren Twaig o...@scalemp.com wrote: Hi Andi, On 04/25/2014 05:22 PM, Andi Kleen wrote: +static int irc = 1; Using a static for such state is very unusual. You need to describe what protects it against races and why that is needed over a cleaner solution. The only reason I've

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-26 Thread Ingo Molnar
* Oren Twaig wrote: > On 4/25/2014 11:01 AM, Ingo Molnar wrote: > > > > * Oren Twaig wrote: > > > >> vSMP Foundation provides locality based interrupt routing which needed > >> vector_allocation_domain to allow all online cpus can handle all > possible > >> vectors. > >> > >> Enforcing

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-26 Thread Ingo Molnar
* Oren Twaig o...@scalemp.com wrote: On 4/25/2014 11:01 AM, Ingo Molnar wrote: * Oren Twaig o...@scalemp.com wrote: vSMP Foundation provides locality based interrupt routing which needed vector_allocation_domain to allow all online cpus can handle all possible vectors.

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-25 Thread Andi Kleen
> diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c > index f6584a9..b7f8e5b 100644 > --- a/arch/x86/kernel/vsmp_64.c > +++ b/arch/x86/kernel/vsmp_64.c > @@ -26,6 +26,8 @@ > > #define TOPOLOGY_REGISTER_OFFSET 0x10 > > +static int irc = 1; Using a static for such state is

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-25 Thread Oren Twaig
On 4/25/2014 11:01 AM, Ingo Molnar wrote: > * Oren Twaig wrote: > >> vSMP Foundation provides locality based interrupt routing which needed >> vector_allocation_domain to allow all online cpus can handle all possible >> vectors. >> >> Enforcing Interrupt Routing Comply (IRC) mode requires

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-25 Thread Ingo Molnar
* Oren Twaig wrote: > vSMP Foundation provides locality based interrupt routing which needed > vector_allocation_domain to allow all online cpus can handle all possible > vectors. > > Enforcing Interrupt Routing Comply (IRC) mode requires us to unplug this hook > as > otherwise the IOAPIC,

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-25 Thread Ingo Molnar
* Oren Twaig o...@scalemp.com wrote: vSMP Foundation provides locality based interrupt routing which needed vector_allocation_domain to allow all online cpus can handle all possible vectors. Enforcing Interrupt Routing Comply (IRC) mode requires us to unplug this hook as otherwise the

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-25 Thread Oren Twaig
On 4/25/2014 11:01 AM, Ingo Molnar wrote: * Oren Twaig o...@scalemp.com wrote: vSMP Foundation provides locality based interrupt routing which needed vector_allocation_domain to allow all online cpus can handle all possible vectors. Enforcing Interrupt Routing Comply (IRC) mode

Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-25 Thread Andi Kleen
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c index f6584a9..b7f8e5b 100644 --- a/arch/x86/kernel/vsmp_64.c +++ b/arch/x86/kernel/vsmp_64.c @@ -26,6 +26,8 @@ #define TOPOLOGY_REGISTER_OFFSET 0x10 +static int irc = 1; Using a static for such state is very

[PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-24 Thread Oren Twaig
vSMP Foundation provides locality based interrupt routing which needed vector_allocation_domain to allow all online cpus can handle all possible vectors. Enforcing Interrupt Routing Comply (IRC) mode requires us to unplug this hook as otherwise the IOAPIC, MSI and MSIX destination selectors to

[PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore

2014-04-24 Thread Oren Twaig
vSMP Foundation provides locality based interrupt routing which needed vector_allocation_domain to allow all online cpus can handle all possible vectors. Enforcing Interrupt Routing Comply (IRC) mode requires us to unplug this hook as otherwise the IOAPIC, MSI and MSIX destination selectors to