From: Thomas Gleixner <tglx@linutronix.de>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: Yevgeny Petrilin <yevgenyp@mellanox.com>,
Jiang Liu <liuj97@gmail.com>, Bjorn Helgaas <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Yael Shenhav <yaeli@mellanox.com>
Subject: Re: IRQ affinity enforced only after first interrupt.
Date: Thu, 5 Apr 2012 10:47:03 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1204051043360.2542@ionos> (raw)
In-Reply-To: <20120404100143.GH28177@dhcp-26-207.brq.redhat.com>
On Wed, 4 Apr 2012, Alexander Gordeev wrote:
> On Mon, Mar 26, 2012 at 09:04:20PM +0200, Thomas Gleixner wrote:
> > On Mon, 26 Mar 2012, Yevgeny Petrilin wrote:
> >
> > > >
> > > > The architecture specific code will determine whether the IRQ could be migrated
> > > > in process context. For example, the IRQ_MOVE_PCNTXT flag will be set on x86
> > > > systems if interrupt remapping is enabled.
> > >
> > > Actually I am encountering this issue with x86, and see different
> > > behavior with different HW devices (NICs). On same machine I have
> > > one device that responds immediately to affinity changes while the
> > > other one changes the affinity only after first interrupt.
> >
> > That simply depends on the underlying hardware. On certain hardware we
> > can change the affinity only in hard interrupt context, that means
> > right when a interrupt of that device is delivered.
> >
> > On the other devices we can change it right away and the corresponding
> > interrupt chips set IRQ_MOVE_PCNTXT to indicate that.
>
> Actually, even with IRQ_MOVE_PCNTXT capable chips, a hardware handler still
> might be called on a core that belongs to old affinity, after the successful
> write of new affinity. Threaded handlers are also racy with irq affinity
> updates.
>
> If that is inconsistency, bug or design?
Well, irq affinity updates are not designed to be immediate. There is
no point in doing so.
> > There is nothing we can do about this. It's dictated by hardware.
>
> May be we could wait for desc->pending_mask to be cleared before returning from
> irq_set_affinity()?
If that device does not issue an interrupt for a long time,
e.g. because the interface is down, then you are stuck there forever.
What's the point of this? One interrupt on the wrong core is nothing
we need to worry about.
Thanks,
tglx
prev parent reply other threads:[~2012-04-05 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F7031A4.70601@mellanox.co.il>
2012-03-26 14:28 ` Bjorn Helgaas
2012-03-26 14:33 ` Jiang Liu
2012-03-26 15:24 ` Yevgeny Petrilin
2012-03-26 19:04 ` Thomas Gleixner
2012-03-27 9:39 ` Yevgeny Petrilin
2012-03-27 12:52 ` Thomas Gleixner
2012-04-04 10:01 ` Alexander Gordeev
2012-04-05 8:47 ` Thomas Gleixner [this message]
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=alpine.LFD.2.02.1204051043360.2542@ionos \
--to=tglx@linutronix.de \
--cc=agordeev@redhat.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=yaeli@mellanox.com \
--cc=yevgenyp@mellanox.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®