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]
Date:	Thu, 10 Jul 2008 22:41:06 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	"Siddha, Suresh B" <suresh.b.siddha@...el.com>,
	"mingo@...e.hu" <mingo@...e.hu>, "hpa@...or.com" <hpa@...or.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
	"andi@...stfloor.org" <andi@...stfloor.org>,
	"jbarnes@...tuousgeek.org" <jbarnes@...tuousgeek.org>,
	"steiner@....com" <steiner@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [patch 11/26] x64, x2apic/intr-remap: generic irq migration support from process context

On Thu, Jul 10, 2008 at 04:08:03PM -0700, Eric W. Biederman wrote:
> Suresh Siddha <suresh.b.siddha@...el.com> writes:
> 
> > Generic infrastructure for migrating the irq from the process context in the
> > presence of CONFIG_GENERIC_PENDING_IRQ.
> >
> > This will be used later for migrating irq in the presence of
> > interrupt-remapping.
> 
> Why the API difference between IRQ_MOVE_PCNTXT set affinity handlers and
> !CONFIG_GENERIC_PENDING_IRQ handlers?

You are referring to desc->lock portion?

Two reasons:

a. Other code in CONFIG_GENERIC_PENDING_IRQ, assuming that desc->lock is held
while calling set_affinity. like fixup_irqs(). Just wanted to be same
across the board.

b. for level triggered, we still touch irq_desc and set IRQ_MOVE_PENDING,
when we fail to move the irq (if there is already some level triggered
interrupt happening in parallel). while, we can acquire the lock inside
the set_affinity, I thought this simplifies things.

> 
> 
> >  #ifdef CONFIG_GENERIC_PENDING_IRQ
> > -     set_pending_irq(irq, cpumask);
> > +     if (desc->status & IRQ_MOVE_PCNTXT) {
> > +             unsigned long flags;
> > +
> > +             spin_lock_irqsave(&desc->lock, flags);
> > +             desc->chip->set_affinity(irq, cpumask);
> > +             spin_unlock_irqrestore(&desc->lock, flags);
> > +     } else
> > +             set_pending_irq(irq, cpumask);
> >  #else
> >       desc->affinity = cpumask;
> >       desc->chip->set_affinity(irq, cpumask);
> >
> > --

thanks,
suresh
--
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