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 109EFC0015E for ; Tue, 15 Aug 2023 11:03:33 +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:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JJVSGqSc3IGLtmnh3KeprinAp4X2/KHZM12XQAShiKY=; b=3RhITo8jtJR6+SXFyV4MjrRX6O 7AIc4kiVtW3/SW+hR2aWz3pKOxk7xQpThnxTdDFf2Uq99iBIg4ouF4p891rno7RTrW21B3K2/J5Gb t1bz9LeeJIdJ7r0WgKYI4NwUZGPeJJALIedZHRHXMRUjId6GdczT9T3O7O1KfHr7BQAFpHw3uBW5f w2QiQKZobpLHen6EZ+xnThPRRQkmYjgHQ6dUqL295nx92+s/ArFF7YXCherenNCvXr6uQmdNKY8yp sqleA04+FhRu29BJ6bsQKEGL3p4mb+u+BOioGp3sbM7XdvJCswEEfxsTn9V6W1E2QdYsw4UIn1JLu meO1nchA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qVrpI-001Spe-19; Tue, 15 Aug 2023 11:03:04 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qVrpF-001Scp-0a for linux-arm-kernel@lists.infradead.org; Tue, 15 Aug 2023 11:03:02 +0000 Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RQ7Yt6YG2zNmsj; Tue, 15 Aug 2023 18:59:14 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 15 Aug 2023 19:02:45 +0800 Subject: Re: [PATCH] drivers/perf: hisi: Schedule perf session according to locality To: Will Deacon CC: , , , , , , References: <20230808125147.2080-1-yangyicong@huawei.com> <20230811111414.GC6993@willie-the-truck> From: Yicong Yang Message-ID: <8b3ea6aa-2751-9612-4b91-82640e8dde0f@huawei.com> Date: Tue, 15 Aug 2023 19:02:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20230811111414.GC6993@willie-the-truck> X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230815_040301_443838_EB394510 X-CRM114-Status: GOOD ( 16.60 ) 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 2023/8/11 19:14, Will Deacon wrote: > 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. > Thanks for pointing it out. This is indeed a problem. Will fix this. Thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel