lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 26 Mar 2012 15:24:57 +0000
From:	Yevgeny Petrilin <yevgenyp@...lanox.com>
To:	Jiang Liu <liuj97@...il.com>, Bjorn Helgaas <bhelgaas@...gle.com>
CC:	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Yael Shenhav <yaeli@...lanox.com>
Subject: RE: IRQ affinity enforced only after first interrupt.

> 
> 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.

> 
> On 03/26/2012 10:28 PM, Bjorn Helgaas wrote:
> > [This is not really a PCI question, so +cc Thomas, LKML.]
> >
> > On Mon, Mar 26, 2012 at 3:06 AM, Yevgeny Petrilin
> > <yevgenyp@...lanox.co.il> wrote:
> >> Hello,
> >>
> >> I'm working on an issue where affinity changes to IRQ only have effect after the first interrupt which still happens on the original core.
> >> I understand that the decision regarding it takes place in this code:
> >>
> >>        if (irq_can_move_pcntxt(data)) {
> >>                ret = chip->irq_set_affinity(data, mask, false);
> >>                switch (ret) {
> >>                case IRQ_SET_MASK_OK:
> >>                        cpumask_copy(data->affinity, mask);
> >>                case IRQ_SET_MASK_OK_NOCOPY:
> >>                        irq_set_thread_affinity(desc);
> >>                        ret = 0;
> >>                }
> >>        } else {
> >>                irqd_set_move_pending(data);
> >>                irq_copy_pending(desc, mask);
> >>        }
> >>
> >> Which means that the "IRQD_MOVE_PCNTXT" flag is not set in irq_data->state_use_accessors.
> >> I was able to add this flag using irq_modify_status(), which is probably not the way to go.
> >> This option also doesn't exist in older kernels (2.6.32)
> >>
> >> So the question is, when irq_desc is created, how is it determined that "IRQD_MOVE_PCNTXT" flag is set?
> >>
> >> Thanks,
> >> Yevgeny

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ