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 B9208C282DE for ; Thu, 13 Mar 2025 09:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To: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=SR7skY0cNZP8+PD07B5V+WakevQ3+dWSBgW7Fpq/qZM=; b=eKG+ejQ8wseo/GXO1osNXjp+P2 LQ9ZKGr0if/4yjqUXLUzP9DPpscG22cIhbhCK6Ht+uVn0bEFsxZcAByQeXIPSigb1DRC0+A+20KaB XCW5qUoU4+7DTcOjNc09/PFMHIYnDR0U1O1ZfMSmc+QOW0eg1xlsVOqwJEwhLuUA7wS4bY5EKJH0q kn0cxyEOIgwtHEIIkPQPFVyunQsf68ao2zsvCM400Pp6eOlak7rucgaG9fqGWI62q8j1R9p78FtZP H2p+Klu5doFZX5DRJbo4z0fNDAlHuNm9IYzWaRP6zcZmMvLV5XQ5orXoZtHrGl1qTRXym18RX4xkS SOxP57Hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tseiR-0000000Ahxt-0cov; Thu, 13 Mar 2025 09:18:59 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tseft-0000000AhOi-1OVP for linux-arm-kernel@lists.infradead.org; Thu, 13 Mar 2025 09:16:22 +0000 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) 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250313_021621_517828_9584071B X-CRM114-Status: GOOD ( 10.34 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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