From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751728AbdFELRk (ORCPT ); Mon, 5 Jun 2017 07:17:40 -0400 Received: from gate.crashing.org ([63.228.1.57]:59405 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbdFELRj (ORCPT ); Mon, 5 Jun 2017 07:17:39 -0400 Message-ID: <1496661424.31588.1.camel@kernel.crashing.org> Subject: Re: [v2] powerpc: handle simultaneous interrupts at once From: Benjamin Herrenschmidt To: Michael Ellerman , Christophe Leroy , Paul Mackerras , Scott Wood Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Mon, 05 Jun 2017 21:17:04 +1000 In-Reply-To: <3wh9ph0pv2z9s7f@ozlabs.org> References: <3wh9ph0pv2z9s7f@ozlabs.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-06-05 at 20:21 +1000, Michael Ellerman wrote: > On Thu, 2017-03-16 at 08:55:45 UTC, Christophe Leroy wrote: > > It often happens to have simultaneous interrupts, for instance > > when having double Ethernet attachment. With the current > > implementation, we suffer the cost of kernel entry/exit for each > > interrupt. > > > > This patch introduces a loop in __do_irq() to handle all interrupts > > at once before returning. > > > > Signed-off-by: Christophe Leroy > > Applied to powerpc next, thanks. > > https://git.kernel.org/powerpc/c/45cb08f4791ce6a15c54598b4cb73d Hrm, I hadn't noticed that patch... We used to do that and then removed the code for it. There's a cost, sometimes noticeable, to an extra call to ppc_md.get_irq. Why not have your get_irq (or eoi) implementation set a per-cpu requesting a new spin of the loop ? We could move the xive force replay stuff to use the same thing. Ben.