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=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 1EAADC433B4 for ; Tue, 18 May 2021 10:50:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 DC0A26124C for ; Tue, 18 May 2021 10:50:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC0A26124C 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=desiato.20200630; 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=82A5Tg913M9W8Gv53nbe9yu+ctHn2oEh1m6LSBFeTw8=; b=poSPuxEquIaG5rI9pVWfzZC1u I/G4gtV8YzvgKKuhDh6ddDqdSMVXbJo9zWdlUl0OlOGtJMnyAX7aMDMuNrSEQVTVuptgHFcA/EFZS Q1YBwosbmAoEQI+SveMEYjK0IardyJQZcVhDH5BbgAI8PJC2Rx6LjiBj0zMpytQJ4TzWrzQhz+lIX MiV0Ut9xkl5Rk+2O/gqqlkPxTZMSQ6uoO41xopdNBN6lW160HHmJapzcfETnbnWFdpkC2vllE/HOF 28RLZEQkRmCgQ1g81AeRPrbVvaVQsOClNAeCv63OIYQAXdrxDdzJY1qJZoCQz6jn73ZFEw+tXfHpY lrw6ZoAdQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lixHZ-000RYc-LB; Tue, 18 May 2021 10:49:02 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lixHW-000RY7-CB for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 10:48:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EeVhHqGsfqlIYGEzDw+EcaOG+1kXzM0pugVkbV5RL+8=; b=P0N2bVWj/kxdiRGcfr9uWo+Eni j240ZoPghRGVunVfN9e/5rJuHNatpfM4c8lvIekfb5GFyCFTzHPrfX3tsw2OdyJs2N0eg3kStoIQi y4bnfIPDlQMRlcGm1efBOfRqTDsmU/HxDwZ1aURQcIlqVSeRwcu2aUafwmsfVQj03ziVkFpxI/EzV 3rKxnZPFf3L6dQiFtMfIuDPVTCmCL4xu30IH0Zh9sMqubv/cVIKreLXxmtCed3mSesVvgeMfr7E1Y u55Tpmas83aJ2sLgYZNFszii3x0f9HOoN3MIQF6PBvh4rsUWosx+W+1jayPPnwOTF7Qy6OW51/xrY PXlt3yYA==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lixHT-00EZz2-VO for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 10:48:57 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D9C5C611CC; Tue, 18 May 2021 10:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621334935; bh=iVNbRw1dHUuSUOPzXc7Jidh1IKCJlI7ySxLTSP7inAw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OilJjhtZl8il3ekgHqbyhCEb+SN+uKEPvQA3Gh7EfEhk9mJHtqshFfn45akRvZ1g2 hoyPouMIsh3M6oxJUN2UuEHZewhmqQD2lfd+nns2yIwxLkuS9VzJench9Hv4PHYm4b bKZztOnuxYaS9fiDUyYZRSpezG5lky3ZDGVKsdWHIrK+/wuz3rWm4D21NPQwQThARz c/oJTxRy62x6kuLs7fuPbE5FhMlnKl4S52nwDJigqOBUTYP8fZBNUbMiDSSR4wA0eN 2jtqWlX342G0h8WVirnllgGYPerY6Czrz5d/e8rkbrY1jvb73VNTYRRwiKcX/rlkP4 by9K38khy3I/A== Date: Tue, 18 May 2021 11:48:49 +0100 From: Will Deacon To: Thomas Gleixner Cc: LKML , Peter Zijlstra , Robin Murphy , Nitesh Lal , Jesse Brandeburg , Marc Zyngier , Mark Rutland , linux-arm-kernel@lists.infradead.org, Frank Li , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Shaokun Zhang Subject: Re: [patch 0/8] genirq, perf: Cleanup the abuse of irq_set_affinity_hint() Message-ID: <20210518104849.GB7770@willie-the-truck> References: <20210518091725.046774792@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518091725.046774792@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_034856_051963_8C2A7AE7 X-CRM114-Status: GOOD ( 19.15 ) 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 Hi Thomas, On Tue, May 18, 2021 at 11:17:25AM +0200, Thomas Gleixner wrote: > The modular PMU drivers use irq_set_affinity_hint() to set the affinity > for the PMU interrupts, which relies on the undocumented side effect that > this function actually sets the affinity under the hood. > > Setting an hint is clearly not a guarantee and for these PMU interrupts an > affinity hint, which is supposed to guide userspace for setting affinity, > is beyond pointless, because the affinity of these interrupts cannot be > modified from user space. > > Aside of that the error checks are bogus because the only error which is > returned from irq_set_affinity_hint() is when there is no irq descriptor > for the interrupt number, but not when the affinity set fails. That's on > purpose because the hint can point to an offline CPU. > > Sigh, if people would at least talk if something is missing... > > Clean up the mess by exposing irq_set_affinity() and converting the drivers > over to that. This all looks good to me, thanks. Given the number of PMU drivers it touches, it may well conflict with driver work for 5.14. If you put the IRQ core stuff on a stable branch, then I could pull that into the Arm perf tree and stick all the driver changes on top. That also means any new drivers that come in can use irq_set_affinity() right away. Does that work for you? Cheers, Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel