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 DB16DC0015E for ; Fri, 11 Aug 2023 11:14:49 +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=NIY5ussdARjF/Qpy2m2S8SfOFurbF8woYfHyJ0ZgaCY=; b=NxFFtQHgp/g5sK rX2ginQCJ4ySs5UMhJBjJ1IUdjxpGaEhNdmxhzGDD24k+90xgcNarAkpAliKdJXgDXq3bF6gF0omX EBlU55FRWDZnYtCtlD9W55YCUBt0n4QiyIs+qxaYSckfa7nCOGAm/6K/iQE1VTfRPJ6hxALv3JZFA G/vLRdkRe+mo/Ndov1Zt8SlYdJAYmAWW6Swi/N1Wz+hhCJAVC4dZLiCpSRGJqTQ5sX9lOZ7vSfITS kuzxljBvjOcQ1SwMdZUPr8eu9IlQv5/WdvJ183ximT+vdtx4pTcr3nnnx7N4Pg6jT4cPQOC10ImBu 1VxyVOeeGCV50/qbt0NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qUQ63-00AP2y-2S; Fri, 11 Aug 2023 11:14:23 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qUQ61-00AP2Y-08 for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 11:14:22 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F28861055; Fri, 11 Aug 2023 11:14:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3721DC433C7; Fri, 11 Aug 2023 11:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691752459; bh=gpFkNrRX0fSFng6Hp3kg8rIpvCPmAJMeifUV263exfg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VhN1imDLjGETpv+Nar9ywdaM399k7zTmoWzlGQFPkzB0oPfB4tEoewMkB1dS6uy+Y YtYOr0M1PrpgCV+mn12Z5fNiAdcxeoHOaqJKVVvCowghPxUz79ooObXRv5+bnA8Asv 6FVBlCXzhwAjt/NbvZQoWdywaHAkTXYdVM3R6DO+RhhLLVD5RYAL+Ry8yI1D+/R36T 6kHSCWaH9fSsENkI6HJen0Gx17SpAuzEDtukoA8IfAkIcJ/kxD2HIsHWf9U/WTga5W XfXIcbqw4kP3LR76RAG8SZcXxsGuL94L9EeXQInWf13nhoOwlgdZlvPHYxpYk83cSm SICNbIq0w7lSQ== Date: Fri, 11 Aug 2023 12:14:14 +0100 From: Will Deacon To: Yicong Yang Cc: jonathan.cameron@huawei.com, mark.rutland@arm.com, hejunhao3@huawei.com, prime.zeng@hisilicon.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, yangyicong@hisilicon.com Subject: Re: [PATCH] drivers/perf: hisi: Schedule perf session according to locality Message-ID: <20230811111414.GC6993@willie-the-truck> References: <20230808125147.2080-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230808125147.2080-1-yangyicong@huawei.com> 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-20230811_041421_147598_C7E56D5F X-CRM114-Status: GOOD ( 21.12 ) 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, Aug 08, 2023 at 08:51:47PM +0800, Yicong Yang wrote: > From: Yicong Yang > > The PCIe PMUs locate on different NUMA node but currently we don't > consider it and likely stack all the sessions on the same CPU: > > [root@localhost tmp]# cat /sys/devices/hisi_pcie*/cpumask > 0 > 0 > 0 > 0 > 0 > 0 > > This can be optimize a bit to use a local CPU for the PMU. > > Signed-off-by: Yicong Yang > --- > drivers/perf/hisilicon/hisi_pcie_pmu.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c > index e10fc7cb9493..60ecf469782b 100644 > --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c > +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c > @@ -665,7 +665,7 @@ static int hisi_pcie_pmu_online_cpu(unsigned int cpu, struct hlist_node *node) > struct hisi_pcie_pmu *pcie_pmu = hlist_entry_safe(node, struct hisi_pcie_pmu, node); > > if (pcie_pmu->on_cpu == -1) { > - pcie_pmu->on_cpu = cpu; > + pcie_pmu->on_cpu = cpumask_local_spread(0, dev_to_node(&pcie_pmu->pdev->dev)); > WARN_ON(irq_set_affinity(pcie_pmu->irq, cpumask_of(cpu))); Hmm, this is a bit weird now, because the interrupt is affine to a different CPU from the one you've chosen. Are you sure that's ok? When the offline notifier picks a new target, it moves the irq as well. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel