All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Frank van der Linden <fllinden@amazon.com>
Cc: stable@vger.kernel.org, tglx@linutronix.de
Subject: Re: [PATCH 5.4] genirq/affinity: Make affinity setting if activated opt-in
Date: Wed, 19 Aug 2020 11:54:46 +0200	[thread overview]
Message-ID: <20200819095446.GA2558675@kroah.com> (raw)
In-Reply-To: <20200810202740.GA22367@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com>

On Mon, Aug 10, 2020 at 08:27:40PM +0000, Frank van der Linden wrote:
> On Mon, Aug 10, 2020 at 08:25:03PM +0000, Frank van der Linden wrote:
> > From: Thomas Gleixner <tglx@linutronix.de>
> > 
> > commit f0c7baca180046824e07fc5f1326e83a8fd150c7 upstream.
> > 
> > John reported that on a RK3288 system the perf per CPU interrupts are all
> > affine to CPU0 and provided the analysis:
> > 
> >  "It looks like what happens is that because the interrupts are not per-CPU
> >   in the hardware, armpmu_request_irq() calls irq_force_affinity() while
> >   the interrupt is deactivated and then request_irq() with IRQF_PERCPU |
> >   IRQF_NOBALANCING.
> > 
> >   Now when irq_startup() runs with IRQ_STARTUP_NORMAL, it calls
> >   irq_setup_affinity() which returns early because IRQF_PERCPU and
> >   IRQF_NOBALANCING are set, leaving the interrupt on its original CPU."
> > 
> > This was broken by the recent commit which blocked interrupt affinity
> > setting in hardware before activation of the interrupt. While this works in
> > general, it does not work for this particular case. As contrary to the
> > initial analysis not all interrupt chip drivers implement an activate
> > callback, the safe cure is to make the deferred interrupt affinity setting
> > at activation time opt-in.
> > 
> > Implement the necessary core logic and make the two irqchip implementations
> > for which this is required opt-in. In hindsight this would have been the
> > right thing to do, but ...
> 
> I backported this one since it had a minor conflict, so while the main
> one was Cc-ed to stable@, it didn't get picked up.

I didn't have the chance to get to it in the long list yet :)

I've done so now, and this matches my backport.  I've also backported it
to 4.19.y, and that seems to match this almost identically as well (one
minor difference).

thanks,

greg k-h

      parent reply	other threads:[~2020-08-19  9:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 20:25 [PATCH 5.4] genirq/affinity: Make affinity setting if activated opt-in Frank van der Linden
2020-08-10 20:27 ` Frank van der Linden
2020-08-10 20:33   ` Thomas Gleixner
2020-08-19  9:54   ` Greg KH [this message]

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=20200819095446.GA2558675@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=fllinden@amazon.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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.