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 CBD8FC282DE for ; Thu, 13 Mar 2025 09:35:48 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4ZD2Rl0LmKz3c6b; Thu, 13 Mar 2025 20:35:47 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=185.176.79.56 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1741858546; cv=none; b=JYFah7i8L6EZ4iito7/DyoUHnQzDrlwoWvd5hinoDFfuYjIUWzu4qatBL+sOqa0Gl2dgfVlrbq+WM7kGqqBPn2Xf9kURvcWpseLLvZusgTxQFbxMDKIhmwlGZb9uVMC60kznC/dJElO8j9eIRzGVv4/C6OqcSyJMoAfaeXRphJjDBlaRbo2OFaqsDykLsDHbE3KRdE/GhpBeGri96djEmQnisW8lprbWu2mCLVDhvW48B3KgIa6NyiaIuRC261xXTnGFJS7YWOglpiBn56Mv1KTMqAv7gkbufr/I/I0nZZ+cf461zAJW/PLaFyrZNBSN2kjCzNDz3W+IfjF68++l8A== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1741858546; c=relaxed/relaxed; bh=SR7skY0cNZP8+PD07B5V+WakevQ3+dWSBgW7Fpq/qZM=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=chiCuPQHlD5bYuWV6BzQRzddeqjK8Fyf+p8PJMeRmNLRh62oaQ00eOOePzuX+fl2Z3isxh47ic4twLAJfRRnxSo4y1xUV4tEI5HnTUTnHi0K6RbiUy1IN4sgetErqNFgGx4ifrqpGjD76Jl3VBYC3Fzcl2SfV8wJk+O/amSc1zk1MwUdzoIJQ+tsbKAX/10oK7DgRqF4+8bOIjTnX04MPXYAAvUrtg1/eAMt/Vs3kIqkwefjZQkBmZWCdp4dE5jzlDfha+WhVmYm1LTIi5lASV9hXXxNE8WBN1fls85TaDP0ZvtqWW2wUS6jldYbZJAcR9xSK1CXZ1lfX836z9IJ2Q== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass (client-ip=185.176.79.56; helo=frasgout.his.huawei.com; envelope-from=jonathan.cameron@huawei.com; receiver=lists.ozlabs.org) smtp.mailfrom=huawei.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=huawei.com (client-ip=185.176.79.56; helo=frasgout.his.huawei.com; envelope-from=jonathan.cameron@huawei.com; receiver=lists.ozlabs.org) X-Greylist: delayed 1165 seconds by postgrey-1.37 at boromir; Thu, 13 Mar 2025 20:35:46 AEDT Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 4ZD2Rk0dVKz2yn4 for ; Thu, 13 Mar 2025 20:35:44 +1100 (AEDT) Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ZD1vy6Wlyz6J6cn; Thu, 13 Mar 2025 17:11:42 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 1F8BF1403A8; Thu, 13 Mar 2025 17:16:14 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 13 Mar 2025 10:16:13 +0100 Date: Thu, 13 Mar 2025 09:16:11 +0000 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v12 2/4] arch_topology: Support SMT control for OF based system Message-ID: <20250313091611.00003ccf@huawei.com> In-Reply-To: <20250311075143.61078-3-yangyicong@huawei.com> References: <20250311075143.61078-1-yangyicong@huawei.com> <20250311075143.61078-3-yangyicong@huawei.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml500010.china.huawei.com (7.191.174.240) To frapeml500008.china.huawei.com (7.182.85.71) On Tue, 11 Mar 2025 15:51:41 +0800 Yicong Yang wrote: > From: Yicong Yang > > On building the topology from the devicetree, we've already gotten the > SMT thread number of each core. Update the largest SMT thread number > and enable the SMT control by the end of topology parsing. > > The framework's SMT control provides two interface to the users [1] > through /sys/devices/system/cpu/smt/control: > 1) enable SMT by writing "on" and disable by "off" > 2) enable SMT by writing max_thread_number or disable by writing 1 > > Both method support to completely disable/enable the SMT cores so both > work correctly for symmetric SMT platform and asymmetric platform with > non-SMT and one type SMT cores like: > core A: 1 thread > core B: X (X!=1) threads > > Note that for a theoretically possible multiple SMT-X (X>1) core > platform the SMT control is also supported as expected but only > by writing the "on/off" method. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-devices-system-cpu#n542 > Reviewed-by: Pierre Gondois > Reviewed-by: Dietmar Eggemann > Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron