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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 829D8C3DA4A for ; Mon, 19 Aug 2024 07:25:32 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4WnPJV4wnNz2xs4; Mon, 19 Aug 2024 17:25:30 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=45.249.212.190 Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=45.249.212.190; helo=szxga04-in.huawei.com; envelope-from=yangyicong@huawei.com; receiver=lists.ozlabs.org) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4WnPJS3yyLz2xjv for ; Mon, 19 Aug 2024 17:25:28 +1000 (AEST) Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4WnPBw732Rz20lxk; Mon, 19 Aug 2024 15:20:40 +0800 (CST) Received: from kwepemd200014.china.huawei.com (unknown [7.221.188.8]) by mail.maildlp.com (Postfix) with ESMTPS id 4786D180041; Mon, 19 Aug 2024 15:25:20 +0800 (CST) Received: from [10.67.121.177] (10.67.121.177) by kwepemd200014.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.34; Mon, 19 Aug 2024 15:25:19 +0800 CC: , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v5 1/4] cpu/SMT: Provide a default topology_is_primary_thread() To: Dietmar Eggemann References: <20240806085320.63514-1-yangyicong@huawei.com> <20240806085320.63514-2-yangyicong@huawei.com> <9c46d5f0-f4ff-461b-b483-840fab6dfecc@arm.com> From: Yicong Yang Message-ID: <1feb896c-e2aa-2ae5-eb7e-dd28bfb40034@huawei.com> Date: Mon, 19 Aug 2024 15:25:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Post: List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <9c46d5f0-f4ff-461b-b483-840fab6dfecc@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.177] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemd200014.china.huawei.com (7.221.188.8) On 2024/8/16 23:54, Dietmar Eggemann wrote: > On 06/08/2024 10:53, Yicong Yang wrote: >> From: Yicong Yang >> >> Currently if architectures want to support HOTPLUG_SMT they need to >> provide a topology_is_primary_thread() telling the framework which >> thread in the SMT cannot offline. However arm64 doesn't have a >> restriction on which thread in the SMT cannot offline, a simplest >> choice is that just make 1st thread as the "primary" thread. So >> just make this as the default implementation in the framework and >> let architectures like x86 that have special primary thread to >> override this function. > > IMHO, ARM64 (/ARM), RISCV and PARISC (SMP) use GENERIC_ARCH_TOPOLOGY > (and drivers/base/arch_topology.c) so they could share > topology_is_primary_thread() also there? > I think yes, if they want to implement HOTPLUG_SMT and don't have a restriction on the primary thread. Thanks.