From: Ingo Molnar <mingo@kernel.org>
To: Oren Twaig <oren@scalemp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Andi Kleen <ak@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Shai Fultheim <shai@scalemp.com>
Subject: Re: [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore
Date: Sat, 26 Apr 2014 08:09:59 +0200 [thread overview]
Message-ID: <20140426060959.GA1944@gmail.com> (raw)
In-Reply-To: <535A421F.4010108@scalemp.com>
* Oren Twaig <oren@scalemp.com> wrote:
> On 4/25/2014 11:01 AM, Ingo Molnar wrote:
> >
> > * Oren Twaig <oren@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 IOAPIC, MSI and MSIX destination selectors to
> always select the
> >> lowest online cpu as the destination. I.e affinity of HW
> interrupts cannot be
> >> controled by kernel and/or userspace code.
> >>
> >> The purpose of the patch is to fix the code to set override
> vector allocation
> >> domain only when IRC is set to ignore to allow the kernel and
> userspace to
> >> effectively control the destination of the HW interrupts.
> >>
> >> Signed-off-by: Oren Twaig <oren@scalemp.com>
> >> Acked-by: Shai Fultheim <shai@scalemp.com>
> >
> > So what was the behavior before the change - certain IRQs did not get
> > routed, they just ended up on CPU0 or on some other undesirable CPU?
> > Or was IRQ distribution random? It's not clear from the changelog.
>
> It all depends on the IRC flag. When set to "ignore" by the linux
> kernel, vSMP Foundation knew that it can deliver the IRQ to the CPU
> which would result in less virtualization overhead. For example, we
> could deliver the HW interrupt to the CPU which got it or any other
> CPU in the system. We couldn't have done it without the kernel
> making sure that each vector can be passed to all CPUs. This is why
> we override the verctor allocation domain to signal all CPUs.
>
> But, when the IRC is set to "comply" we, before this patch, still
> efected the allocation domains alltough it wasn't needed. It wasn't
> needed because when in "comply" mode, we always pass the HW
> interrupt to the CPU the kernel requested (by setting the IOAPIC
> entry, MSI/X entry or IR entry)
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 (i.e. before the change IRQ routing
overhead was more expensive), or something else?
You don't spell this out clearly and it's a crucial piece of
information that comes before every other explanation.
Thanks,
Ingo
next prev parent reply other threads:[~2014-04-26 6:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 21:52 [PATCH v2] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore Oren Twaig
2014-04-25 8:01 ` Ingo Molnar
2014-04-25 11:08 ` Oren Twaig
2014-04-26 6:09 ` Ingo Molnar [this message]
2014-04-27 6:55 ` Oren Twaig
2014-04-27 11:50 ` Ingo Molnar
2014-04-25 14:22 ` Andi Kleen
2014-04-27 6:57 ` Oren Twaig
2014-04-27 11:54 ` Ingo Molnar
2014-04-27 18:34 ` Andi Kleen
2014-04-28 7:06 ` Oren Twaig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140426060959.GA1944@gmail.com \
--to=mingo@kernel.org \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oren@scalemp.com \
--cc=shai@scalemp.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.