WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Re: [PATCH] irq: Exclude percpu IRQs from being fixed up

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: RE: [Xen-devel] Re: [PATCH] irq: Exclude percpu IRQs from being fixed up
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 5 May 2011 14:55:56 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Dong, Eddie" <eddie.dong@xxxxxxxxx>, "Zhang, Fengzhe" <IMCEAEX-_O=INTEL_OU=EXCHANGE+20ADMINISTRATIVE+20GROUP+20+28FYDIBOHF23SPDLT+29_CN=RECIPIENTS_CN=Fzhan17@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Wed, 04 May 2011 23:57:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1297933765.16356.1344.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1A42CE6F5F474C41B63392A5F80372B2335E978D@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4D5BF2FE02000078000322EB@xxxxxxxxxxxxxxxxxx> <4D5C68AF.3030807@xxxxxxxxx> <4D5CE1DE0200007800032557@xxxxxxxxxxxxxxxxxx> <1297933765.16356.1344.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcvOgmS6thHgEHH2SoqtV82P/UJskg8axIqw
Thread-topic: [Xen-devel] Re: [PATCH] irq: Exclude percpu IRQs from being fixed up
> From: Ian Campbell [mailto:Ian.Campbell@xxxxxxxxxx]
> Sent: Thursday, February 17, 2011 5:09 PM
> 
> On Thu, 2011-02-17 at 07:52 +0000, Jan Beulich wrote:
> > >>> On 17.02.11 at 01:15, Fengzhe Zhang <fengzhe.zhang@xxxxxxxxx>
> wrote:
> > > IRQ_PER_CPU switch is not found in current Kconfig. I'm not sure if
> > > this
> >
> > kernel/irq/Kconfig (introduced as a generic option in 2.6.38-rc2). In
> > prior kernel you'd have to add a respective Kconfig item in
> > drivers/xen/Kconfig.
> 
> Also this should be fixed in mainline _before_ being considered for 
> backporting
> to the xen/stable-2.6.32.x branch, otherwise it will simply come back one day
> when the stable branch moves forward...

yes, it's preferred if we can make it common instead of special case.

> 
> > > feature is going to be brought back in the short term. I remove the
> > > ifdef to set IRQ_PER_CPU flag in desc by default but still leave the
> > > IRQ handling logic unchanged. This is a temporary solution to fix
> > > system crash on poweroff. And this is the fix with minimum impact
> > > among the several solutions we tried.
> >
> > But it's more a hack than a fix.
> 
> Agreed, it seems to take a very narrow approach to a specific failure without
> looking at the bigger picture.

latest tip also removes the CONFIG_IRQ_PER_CPU switch now, as people think it
save little by adding #ifdef. So for current 2.6.39 pv tree, we only need the 
proper
check in irq.c, but we do need select this config option for .32 tree as you
suggested or backport below commit:

commit 6a58fb3bad099076f36f0f30f44507bc3275cdb6
Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Date:   Tue Feb 8 15:40:05 2011 +0100

    genirq: Remove CONFIG_IRQ_PER_CPU
    
    The saving of this switch is minimal versus the ifdef mess it
    creates. Simple enable PER_CPU unconditionally and remove the config
    switch.
    
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

> 
> >  And making per-CPU IRQs properly
> > treated as such isn't a bad idea in any case, I would say.
> 
> In addition changing generic code, which also has an impact on native, in this
> way needs a lot more rationale in the commit message as to why it is correct
> for both Xen and native. Most importantly it needs to go via the x86
> maintainers and not the Xen maintainers.

I'll try to ping kernel upstream first, but the likelihood for acceptance is 50 
vs. 50.
native x86 doesn't use percpu irq so far, and thus to handle this flag is 
specific 
to Xen. but perhaps we can persuade them since fixup_irqs is not in critical 
path
and if we consider Xen as a special platform requiring percpu irq support, it's
probably good to have it.

> 
> It also need to be made very clear why the semantics which are required for
> this specific lock (lock_kicker_irq) are correct and desirable for _every_
> IRQ_PER_CPU (aka IRQF_PERCPU) lock on x86. The description of this patch
> does not do this.

I'll elaborate it when sending to the kernel side. Basically the fix is not 
specific to
spinlock irq. it's for all percpu type irq.

> 
> How does this change tie in with the existing mainline IRQF_NO_SUSPEND flag
> (which Xen uses on these IPI IRQs) and the IRQF_FORCE_RESUME flag currently
> in the tip tree (intended for 2.6.39, I believe)?
> 

I think they're orthogonal. fixup_irqs is required when you try to hot remove a 
cpu,
and in reboot/suspend path this happens before handling device suspend.

Thanks
Kevin
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>