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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1vdnb4fki.fsf@fess.ebiederm.org>
Date:	Thu, 04 Jun 2009 18:47:25 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	suresh.b.siddha@...el.com
Cc:	"mingo\@elte.hu" <mingo@...e.hu>, "hpa\@zytor.com" <hpa@...or.com>,
	"tglx\@linutronix.de" <tglx@...utronix.de>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	"ak\@linux.intel.com" <ak@...ux.intel.com>,
	"travis\@sgi.com" <travis@....com>,
	"steiner\@sgi.com" <steiner@....com>,
	Gary Hade <garyhade@...ibm.com>
Subject: Re: [patch] x64: Avoid irq_chip mask/unmask in fixup_irqs for interrupt-remapping

Suresh Siddha <suresh.b.siddha@...el.com> writes:

> On Thu, 2009-06-04 at 18:18 -0700, Suresh Siddha wrote:
>> On Thu, 2009-06-04 at 16:13 -0700, Eric W. Biederman wrote:
>> > Suresh Siddha <suresh.b.siddha@...el.com> writes:
>> > 
>> > > From: Suresh Siddha <suresh.b.siddha@...el.com>
>> > > Subject: x64: Avoid irq_chip mask/unmask in fixup_irqs for interrupt-remapping
>> > >
>> > > In the presence of interrupt-remapping, irqs will be migrated in the
>> > > process context and we don't do (and there is no need to) irq_chip mask/unmask
>> > > while migrating the interrupt.
>> > >
>> > > Similarly fix the fixup_irqs() that get called during cpu offline and avoid
>> > > calling irq_chip mask/unmask for irqs that are ok to be migrated in the
>> > > process context.
>> > >
>> > > While we didn't observe any race condition with the existing code,
>> > > this change takes complete advantage of interrupt-remapping in
>> > > the newer generation platforms and avoids any potential HW lockup's
>> > > (that often worry Eric :)
>> > 
>> > You now apparently fail to migrate the irq threads in tandem with
>> > the rest of the irqs.
>> 
>> Eric, Are you referring to Gary's issues? As far as I understand, they
>> don't happen in the presence of interrupt-remapping.
>> 
>> Can you ack this patch, as this avoid touching IO-APIC and MSI entries
>> and does fixup_irqs() in a much more reliable fashion.
>
> in the presence of interrupt-remapping ofcourse :)

As far as this patch goes it looks like an improvement.

Acked-by: "Eric W. Biederman" <ebiederm@...ssion.com>

However after looking at Gary's issues I see some things that are still wrong
on this path.

1) We don't do the part of irq migration that moves irq threads.
   We aren't using irq threads yet but still

   If we could figure out how to call irq_set_affinity for the IRQ_MOVE_PCNTXT
   code path that would make the maintenance a lot simpler.

2) We still diverge on 32bit vs 64bit for no reason.
   I expect the fixed 64bit version should be moved into apic/io_apic.c

3) We still enable irqs for a short while after this to let things drain.
   I am wondering if that is really necessary.    It does very simply
   allow the irq cleanup ipi to happen, and it unjams any irqs that happened
   before we migrated them.

   If we wanted to very strictly follow the rules I guess we could do something
   like the cleanup_ipi by hand on the cpu that is going down and rebroadcast
   all of the pending irqs to another cpu to process.

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