All of lore.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "Pallipadi\, Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>, "Li\,
	Shaohua" <shaohua.li@intel.com>, Gary Hade <garyhade@us.ibm.com>,
	"mingo\@elte.hu" <mingo@elte.hu>,
	"mingo\@redhat.com" <mingo@redhat.com>,
	"tglx\@linutronix.de" <tglx@linutronix.de>,
	"hpa\@zytor.com" <hpa@zytor.com>,
	"x86\@kernel.org" <x86@kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lcm\@us.ibm.com" <lcm@us.ibm.com>
Subject: Re: [PATCH 2/3] [BUGFIX] x86/x86_64: fix CPU offlining triggered inactive device IRQ interrruption
Date: Mon, 13 Apr 2009 11:50:20 -0700	[thread overview]
Message-ID: <m1ab6kfkwj.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <1239644495.4529.8580.camel@localhost.localdomain> (Venkatesh Pallipadi's message of "Mon\, 13 Apr 2009 10\:41\:35 -0700")

"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> writes:

> On Sat, 2009-04-11 at 04:01 -0700, Eric W. Biederman wrote:
>> Yinghai Lu <yhlu.kernel@gmail.com> writes:
>> 
>> > commit 932775a4ab622e3c99bd59f14cc7d96722f79501
>> > Author: venkatesh.pallipadi@intel.com <venkatesh.pallipadi@intel.com>
>> > Date:   Fri Sep 5 18:02:15 2008 -0700
>> >
>> >     x86: HPET_MSI change IRQ affinity in process context when it is disabled
>> >
>> >     Change the IRQ affinity in the process context when the IRQ is disabled.
>> >
>> >     Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>> >     Signed-off-by: Shaohua Li <shaohua.li@intel.com>
>> >     Signed-off-by: Ingo Molnar <mingo@elte.hu>
>> >
>> > diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>> > index ddc9568..ad2ce72 100644
>> > --- a/kernel/irq/manage.c
>> > +++ b/kernel/irq/manage.c
>> > @@ -87,10 +87,11 @@ int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
>> >                 return -EINVAL;
>> >
>> >  #ifdef CONFIG_GENERIC_PENDING_IRQ
>> > -       if (desc->status & IRQ_MOVE_PCNTXT) {
>> > +       if (desc->status & IRQ_MOVE_PCNTXT || desc->status & IRQ_DISABLED) {
>> >                 unsigned long flags;
>> >
>> >                 spin_lock_irqsave(&desc->lock, flags);
>> > +               desc->affinity = cpumask;
>> >                 desc->chip->set_affinity(irq, cpumask);
>> >                 spin_unlock_irqrestore(&desc->lock, flags);
>> >         } else
>> 
>> If the goal is moving MSIs, we should modify the msi code to be safe
>> in process context and to set IRQ_MOVE_PCNTXT.
>> 
>> The only reason we migrate MSIs in interrupt context today is that there
>> wasn't infrastructure for support migration both in interrupt context
>> and outside of it.
>> 
>
> Yes. The idea here was to force the MSI migration to happen in process
> context. One of the patches in the series did
>
> 	disable_irq(dev->irq);
> 	irq_set_affinity(dev->irq, cpumask_of(dev->cpu));
> 	enable_irq(dev->irq);
>
> with the above patch adding irq/manage code check for interrupt disabled
> and moving the interrupt in process context.
>
> IIRC, there was no IRQ_MOVE_PCNTXT when we were developing this HPET
> code and we ended up having this ugly hack. IRQ_MOVE_PCNTXT was there
> when we eventually submitted the patch upstream. But, looks like I did a
> blind rebasing instead of using IRQ_MOVE_PCNTXT in hpet MSI code. That
> was my fault. Will send a patch to fix this ugliness.

Thanks.

Eric

  reply	other threads:[~2009-04-13 18:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-08 21:07 [PATCH 2/3] [BUGFIX] x86/x86_64: fix CPU offlining triggered inactive device IRQ interrruption Gary Hade
2009-04-08 22:30 ` Yinghai Lu
2009-04-08 23:37   ` Gary Hade
2009-04-08 23:58     ` Yinghai Lu
2009-04-08 23:59       ` Yinghai Lu
2009-04-09 19:17         ` Gary Hade
2009-04-09 22:38           ` Yinghai Lu
2009-04-10  0:53             ` Gary Hade
2009-04-10  1:29 ` Eric W. Biederman
2009-04-10 20:09   ` Gary Hade
2009-04-10 22:02     ` Eric W. Biederman
2009-04-11  7:44       ` Yinghai Lu
2009-04-11  7:51       ` Yinghai Lu
2009-04-11 11:01         ` Eric W. Biederman
2009-04-13 17:41           ` Pallipadi, Venkatesh
2009-04-13 18:50             ` Eric W. Biederman [this message]
2009-04-13 22:20               ` [PATCH] irq, x86: Remove IRQ_DISABLED check in process context IRQ move Pallipadi, Venkatesh
2009-04-14  1:40                 ` Eric W. Biederman
2009-04-14 14:06                 ` [tip:irq/urgent] x86, irq: " tip-bot for Pallipadi, Venkatesh
2009-04-12 19:32 ` [PATCH 2/3] [BUGFIX] x86/x86_64: fix CPU offlining triggered inactive device IRQ interrruption Eric W. Biederman
2009-04-13 21:09   ` Gary Hade

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=m1ab6kfkwj.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=garyhade@us.ibm.com \
    --cc=hpa@zytor.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=shaohua.li@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venkatesh.pallipadi@intel.com \
    --cc=x86@kernel.org \
    --cc=yhlu.kernel@gmail.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 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.