From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78B1CC388F9 for ; Tue, 27 Oct 2020 12:07:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13BB3207C4 for ; Tue, 27 Oct 2020 12:07:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mg38yjIR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="wVU81IBg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13BB3207C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z9lwA7Akz5HIAESa39RIZrJsnQgYrKo58KVVHi5ztKQ=; b=mg38yjIRsqZ/5jU0elC/XMzfF Kqehr63aVMMMVQq8GC5U9ZvaLfU6i3J2JezxLEEk8Nn435l8IArBfnXWFZXWcQDoTbvzjrHZUggD7 pzkc/sReiaUL1CFmyUWFNLt4DLBb4JSlFQnfp2s7FJSW6wCIfo/p99of/VB0abMToLf/OfQTnNjWi mE9PrD6tb5XKUPUF9QBAsnEyMGCgrlTlkWbGKpvrW6JERmhTXAq0ESUkAdmWOEbOVapeBCbXfNzSK yhuTMKuWb2Nxj/YLXZ/XuIOd/HY2Yj2KS3P13UytRQKW9LDD83Ht7bF9kdEO8x9SP8TPuC9KI6PGU /iHJLh61w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXNjz-0003vd-EE; Tue, 27 Oct 2020 12:06:15 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXNjt-0003uc-2S for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 12:06:13 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D87B722264; Tue, 27 Oct 2020 12:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603800368; bh=h2JSf7zkOuIxpb10PQ5i/18/ehXzNDpVaiT54yUduwI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=wVU81IBgZfupXY+Ww7y1M1QdtUt6r1EVBjgUBfu7Cc7L1vm4zF90OF2wed95UwvR3 alBV+89qS4Rfd+PDw4lQA8sH7SmXhQhBRz8o53Zo9D3Mo9f13rsCV07dR8LD3FYMp9 lzd0NED30lx/8XtRJDVNMYzrMG8VBVErLYldZvgE= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1kXNjp-004g8O-Ky; Tue, 27 Oct 2020 12:06:05 +0000 MIME-Version: 1.0 Date: Tue, 27 Oct 2020 12:06:05 +0000 From: Marc Zyngier To: Vincent Guittot Subject: Re: [PATCH v3 03/16] arm64: Allow IPIs to be handled as normal interrupts In-Reply-To: References: <20200901144324.1071694-1-maz@kernel.org> <20200901144324.1071694-4-maz@kernel.org> <353f13b0dcc6c7ea1b44012d9632a0cc@kernel.org> <7b754dfe579044902d3468b9f864bd37@kernel.org> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <11951c39bc676b83def46150e58e8df3@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: vincent.guittot@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, catalin.marinas@arm.com, linux@arm.linux.org.uk, tglx@linutronix.de, jason@lakedaemon.net, sumit.garg@linaro.org, Valentin.Schneider@arm.com, f.fainelli@gmail.com, gregory.clement@bootlin.com, andrew@lunn.ch, saravanak@google.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_080609_271122_E7923A84 X-CRM114-Status: GOOD ( 28.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sumit Garg , Android Kernel Team , Florian Fainelli , Russell King , Jason Cooper , Saravana Kannan , Andrew Lunn , Catalin Marinas , Gregory Clement , linux-kernel , Thomas Gleixner , Will Deacon , Valentin Schneider , LAK Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-10-27 11:21, Vincent Guittot wrote: > On Tue, 27 Oct 2020 at 11:50, Vincent Guittot > wrote: >> >> On Tue, 27 Oct 2020 at 11:37, Marc Zyngier wrote: >> > >> > On 2020-10-27 10:12, Vincent Guittot wrote: >> > > HI Marc, >> > > >> > > On Mon, 19 Oct 2020 at 17:43, Vincent Guittot >> > > wrote: >> > >> >> > >> On Mon, 19 Oct 2020 at 15:04, Marc Zyngier wrote: >> > >> > >> > > >> > > ... >> > > >> > >> > >> >> > >> > >> One of the major difference is that we end up, in some cases >> > >> > >> (such as when performing IRQ time accounting on the scheduler >> > >> > >> IPI), end up with nested irq_enter()/irq_exit() pairs. >> > >> > >> Other than the (relatively small) overhead, there should be >> > >> > >> no consequences to it (these pairs are designed to nest >> > >> > >> correctly, and the accounting shouldn't be off). >> > >> > > >> > >> > > While rebasing on mainline, I have faced a performance regression for >> > >> > > the benchmark: >> > >> > > perf bench sched pipe >> > >> > > on my arm64 dual quad core (hikey) and my 2 nodes x 112 CPUS (thx2) >> > >> > > >> > >> > > The regression comes from: >> > >> > > commit: d3afc7f12987 ("arm64: Allow IPIs to be handled as normal >> > >> > > interrupts") >> > >> > >> > >> > That's interesting, as this patch doesn't really change anything (most >> > >> > of the potential overhead comes in later). The only potential overhead >> > >> > I can see is that the scheduler_ipi() call is now wrapped around >> > >> > irq_enter()/irq_exit(). >> > >> > >> > >> > > >> > >> > > v5.9 + this patch >> > >> > > hikey : 48818(+/- 0.31) 37503(+/- 0.15%) -23.2% >> > >> > > thx2 : 132410(+/- 1.72) 122646(+/- 1.92%) -7.4% >> > >> > > >> > >> > > By + this patch, I mean merging branch from this patch. Whereas >> > >> > > merging the previous: >> > >> > > commit: 83cfac95c018 ("genirq: Allow interrupts to be excluded from >> > >> > > /proc/interrupts") >> > >> > > It doesn't show any regression >> > >> > >> > >> > Since you are running perf, can you spot where the overhead occurs? >> > > >> > > Any idea about the root cause of the regression ? >> > > I have faced it on more arm64 platforms in the meantime >> > >> > two possible causes: >> > >> > (1) irq_enter/exit on the rescheduling IPI means we reschedule much more >> > often >> > (2) irq_domain lookups add some overhead. >> > >> > For (1), I have this series[1] which is ugly as sin and needs much more >> > testing. >> >> Ok, I'm going to test this series to see if it fixes the perf >> regression > > You have spotted the root cause of the regression. We are back to ~1% > performance diff on the hikey Yeah. Only thing is that I can't look at this hack without vomiting... M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel