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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 270C6C004D4 for ; Wed, 18 Jan 2023 09:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DVVdfD7zU0Nvsre9PwxNOfvYL3+C4zk127PxUHabtmE=; b=F/XexVkrdFiiZ0 DVPkRm9IeEBP5gBByKeC3Lc0H/UAZpXkfRqWNSRLLyBueicd4xghzSzIkussWTaC+w7nLD6t7Fhm6 G50py9I5S4C8xeBcQSf/SrOmQ5MiS/G9eOXbEd8gLxTwJuJxvoVeiLrgrsjVrcEinYCX80tHv8gy7 liWkdxytJn7vSyFw7v+//F9pWHU4qg0SU0HrmlMpXUg1RysIkZxbE/poHuuagh1qU1VaqAike65ws yNxIZMuLs7ej6Jv4l9VplvHoxoGmQct8yooDhAVGbHNc5Zysmaw5uo7TzHJG85wfSouFDFX5XTsss /Db5glXCaAa4gWA+Z6tw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI56M-000CGZ-3O; Wed, 18 Jan 2023 09:51:26 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI56I-000CFF-BC for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 09:51:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AFB1EB81C16; Wed, 18 Jan 2023 09:51:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47ACBC433D2; Wed, 18 Jan 2023 09:51:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674035479; bh=j/7pxZs99cf2pf1Bco/XMbeVzyp9qS8qcECcckzCgwI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sqmZoVeGBkzKKbVdNOT1zBosOWrD2+vFykeBgMmnJT82zWMD/Zf1AK1d39A2ygvdk yLmefoW/XOjQndPkjz5vYkpLE9hG0BY4L7JWF9DhYKWZhBH8sZsXzrJjTBiia6f9tk xJAwe/5LlE0JknRYXhNmGPWkj0m4cR/BAHbxXOlo0ncfuMtB1jSS3FavGrZmt2RoKS 0ZotIc9qe4fvw+qMe6SA2B+uTVlakxtncNHvvJ0LNRxEW9hQC5uFHt2ttZDZKmcERi SnBt3eIrIFF/g4w480CdSN0DDwh2oEYIxmWwbT2c6IwdYBoQd2uGbXXDnRK1/iZyFE LSGUPX8TnDi+w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pI56d-00021s-KC; Wed, 18 Jan 2023 10:51:43 +0100 Date: Wed, 18 Jan 2023 10:51:43 +0100 From: Johan Hovold To: Thomas Gleixner Cc: Johan Hovold , Marc Zyngier , x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Hsin-Yi Wang , Mark-PK Tsai Subject: Re: [PATCH v4 19/19] irqdomain: Switch to per-domain locking Message-ID: References: <20230116135044.14998-1-johan+linaro@kernel.org> <20230116135044.14998-20-johan+linaro@kernel.org> <87mt6gkez4.ffs@tglx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87mt6gkez4.ffs@tglx> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_015122_538401_9392057F X-CRM114-Status: GOOD ( 19.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 17, 2023 at 10:50:39PM +0100, Thomas Gleixner wrote: > On Mon, Jan 16 2023 at 14:50, Johan Hovold wrote: > > The IRQ domain structures are currently protected by the global > > irq_domain_mutex. Switch to using more fine-grained per-domain locking, > > which may potentially speed up parallel probing somewhat. > > Does it or not? > > If not then why adding all this churn for no real value? It probably doesn't make much difference, but Marc wanted per-domain locking: > I'd really like to avoid a global mutex. At the very least this should > be a per-domain mutex, otherwise this will serialise a lot more than > what is needed. Yeah, I considered that too, but wanted to get your comments on this first. Also note that the likewise global irq_domain_mutex (and sparse_irq_lock) are taken in some of these paths so perhaps using finer locking won't actually matter that much as this is mostly for parallel probing. https://lore.kernel.org/lkml/YuKHiZuNvN+K9NCc@hovoldconsulting.com/ As part of fixing the races, this series has now replaced the per-domain revmap mutexes with the global irq_domain_mutex, which could possibly be perceived as a step in the wrong direction in this respect. This patch restores per-domain locking for non-hierarchical domains and extends it to hierarchical domains. This leaves the irq_domain_mutex to only be used for things that actually need a global lock such as the domain list. I consider this mostly a clean up, and I did intentionally place it last in order to not have the fixes depend on it. Johan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel