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 E414DC4332F for ; Tue, 18 Oct 2022 13:54:47 +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-Type: Content-Transfer-Encoding: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=n1nIzK7HTaMFg2mPyFVOk2HDSQvvVpegx/+fc+t+oic=; b=I+5iJrqQR9U8juijW5tH4w8/Df iS/sW8zLaLrHfWxQwEhBuRnntLzZG6ToXOWYFJcFNSlSjVjnaGVcxuC9B1DzaHD20S7M+9E5t9yl1 FfemdVg3VWJ70RocnL3NI0ifb0m9GMpM59RWj381mJV2+ZRjq3F+4bwlOoLLnrMcooiYNKdUS98d/ tdCIGu72SBLRRKVwQ4KhRqsJKVZdDQosGW59KBo37pc1CZaBGUbhBFFX5pxQwGZbm/jDj8DZmuqLT kmNoxIlf8W6N7VQA1ioxGIJx5E9EY/i3uN7P8EeCn+TCq3pLNRg/y2sLiDb4BUF6deE85mfUmabqR pHcWIUDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okn2N-007Anz-2K; Tue, 18 Oct 2022 13:53:43 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okn2J-007Aic-IM for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2022 13:53:41 +0000 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MsFgj05T2zHtrL; Tue, 18 Oct 2022 21:53:21 +0800 (CST) Received: from kwepemm600007.china.huawei.com (7.193.23.208) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 21:53:10 +0800 Received: from [10.174.185.210] (10.174.185.210) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 18 Oct 2022 21:53:09 +0800 Subject: Re: [PATCH 0/3] arm_pmu: acpi: avoid allocations in atomic context To: Mark Rutland CC: , , , , "moderated list:ARM SMMU DRIVERS" , Zenghui Yu , "wanghaibin.wang@huawei.com" , "wangyanan (Y)" References: <20220930111844.1522365-1-mark.rutland@arm.com> From: Kunkun Jiang Message-ID: Date: Tue, 18 Oct 2022 21:53:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220930111844.1522365-1-mark.rutland@arm.com> Content-Language: en-US X-Originating-IP: [10.174.185.210] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221018_065339_996661_91A785B2 X-CRM114-Status: GOOD ( 14.38 ) 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-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 Hi Mark: On 2022/9/30 19:18, Mark Rutland wrote: > I've tested the series in a VM, using ACPI and faked MIDR values to test > a few homogeneous and heterogeneous configurations, using the 'maxcpus' > kernel argument to test the late-hotplug behaviour: I did the same test as you(without this series) and encountered the same problem. Nice to see this series while asking for help in the community. But why not register their own CPU PMU for late hotplugged cpus with a unique MIDR? Are there any restrictions here? Thanks, Kunkun Jiang > > * On a system where all CPUs have the same MIDR, late-onlining a CPU causes it > to be associated with a matching PMU: > > | # ls /sys/bus/event_source/devices/ > | armv8_pmuv3_0 breakpoint software tracepoint > | # cat /sys/bus/event_source/devices/armv8_pmuv3_0/cpus > | 0-7 > | # echo 1 > /sys/devices/system/cpu/cpu10/online > | Detected PIPT I-cache on CPU10 > | GICv3: CPU10: found redistributor a region 0:0x00000000081e0000 > | GICv3: CPU10: using allocated LPI pending table @0x00000000402b0000 > | CPU10: Booted secondary processor 0x000000000a [0x431f0af1] > | # ls /sys/bus/event_source/devices/ > | armv8_pmuv3_0 breakpoint software tracepoint > | # cat /sys/bus/event_source/devices/armv8_pmuv3_0/cpus > | 0-7,10 > > * On a system where all CPUs have a unique MIDR, each of the boot-time > CPUs gets a unique PMU: > > | # ls /sys/bus/event_source/devices/ > | armv8_pmuv3_0 armv8_pmuv3_3 armv8_pmuv3_6 software > | armv8_pmuv3_1 armv8_pmuv3_4 armv8_pmuv3_7 tracepoint > | armv8_pmuv3_2 armv8_pmuv3_5 breakpoint > > * On a system where all CPUs have a unique MIDR, late-onlining a CPU > results in that CPU not being associated with a PMU, but the CPU is > successfully onlined: > > | # echo 1 > /sys/devices/system/cpu/cpu8/online > | Detected PIPT I-cache on CPU8 > | GICv3: CPU8: found redistributor 8 region 0:0x00000000081a0000 > | GICv3: CPU8: using allocated LPI pending table @0x0000000040290000 > | Unable to associate CPU8 with a PMU > | CPU8: Booted secondary processor 0x0000000008 [0x431f0af1] > > Thanks, > Mark. > > Mark Rutland (3): > arm_pmu: acpi: factor out PMU<->CPU association > arm_pmu: factor out PMU matching > arm_pmu: rework ACPI probing > > drivers/perf/arm_pmu.c | 17 +----- > drivers/perf/arm_pmu_acpi.c | 113 ++++++++++++++++++++--------------- > include/linux/perf/arm_pmu.h | 1 - > 3 files changed, 69 insertions(+), 62 deletions(-) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel