Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20645320rwd; Thu, 29 Jun 2023 05:20:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Rn6LOBARM2CMqsxK0zT+4Z45rL6i0oQ7ysHM2v/3XtA7GBfvAx2LmwKP7A8YIPVlloWf1 X-Received: by 2002:a05:6a20:6a1e:b0:114:7637:3459 with SMTP id p30-20020a056a206a1e00b0011476373459mr23962613pzk.4.1688041237210; Thu, 29 Jun 2023 05:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688041237; cv=none; d=google.com; s=arc-20160816; b=KPJ+rkD2kwYxsVdA5Ws4n9W1PSMdUcindhqNhXYcqeoJN9wwmy6yD8UJ6RuO2UoToH HLmVzEOBiRHuvEJSCYvkh1cjcknPbPFdV5xnERqy71haVzPtGvRf62Fl638vitKotyeE ZZjKh7brLSO5599m2ANJtHzX/fqry2RWioXHueBPKwRwfebLkiOCgnnlP6HHNaGQdwSs SMCWybEsM41zpQ4EY5amm/ZHArnvVtmnkraVB6osxieMKhBncqF8we23s4xoA0qlM0Zn 1/RVa1VjscKP7iAPLw7LKcsv/K6uGw2WADbAsNgJdgpAb6lqhIO7JGbYmTX6DPLSkv/h cVUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=FFcWFhPXK4s5EhufV5iP50/C3C+p/BQChJ9YUO6Wogs=; fh=PT7YATVV8h68FP7zk2p1xJUGsqXHQauf9ImokoG5960=; b=B2n0dbXWRjd6iCBQbJvhTNcqiq6hkbljxcDUFvYZzZ99VZGvYyFaVBmzo/5X4eW+Er sxODi7SVAdmsowylmAwx2GVZdk2admr/eOK/uObYQSoGRiX4GixzGbRJTa1w6hsVbPld oCs2/xF58pH16sD2bxISunSNgaPtEeNTu9yujOs4pNR1NnY0JtvVBWb7eRd9cpSsdd5Z 2utuLMyv+o3Qv0xAol0YqGRfOK2Es/1CiszC/lQz8dxcL7MbxM3QjU/8+wMsPe1ZEXSM jHlBIskhvEReR6KVGL2+nPY+gvFLpjpatDbQ/T4AEBLkvIqPcT0KpWlq0mxqaSYJ2c0e N5Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UNx7oT3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dw16-20020a056a00369000b00666e42caa20si7915959pfb.203.2023.06.29.05.20.22; Thu, 29 Jun 2023 05:20:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UNx7oT3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231663AbjF2MEm (ORCPT + 99 others); Thu, 29 Jun 2023 08:04:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbjF2MEl (ORCPT ); Thu, 29 Jun 2023 08:04:41 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E65AA2D71; Thu, 29 Jun 2023 05:04:39 -0700 (PDT) Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35TBlb6h014110; Thu, 29 Jun 2023 12:04:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=FFcWFhPXK4s5EhufV5iP50/C3C+p/BQChJ9YUO6Wogs=; b=UNx7oT3DvlVOz5pk0UY8ZUpqPKoFDq2aQ2IEiLqdDzzbU88NCWYMTrXnxeR8wZT4+7aY oCCoMwdpI6hdRAlbBAjVyZt2nUfK4D4qoscePARhmUZWDb/Klm7VezQhLdj0lJ448bk3 XIl8dvniU9fHssKeXijLtp+KcPUNkWI/E1pC6LpGz4Wgt3YDq47xbGLvpriAT3u7HvqA G3lgfvriY6mWun8GxVKvlv/XHflxW1nXadnFB9mPY28zJs6RiyS2bMe6ZEeKJI7WkmxY IvrjGI/T/xy109Hf8o9kzgZHACMWYQz49vfC8GE7p9w1RjzLjlsAvdk4Fcz0uB5nl/AC xg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rh9d28bk3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jun 2023 12:04:13 +0000 Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35TC0k2k030829; Thu, 29 Jun 2023 12:04:12 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rh9d28bhn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jun 2023 12:04:12 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35TBYLAi011422; Thu, 29 Jun 2023 12:04:09 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma03fra.de.ibm.com (PPS) with ESMTPS id 3rdr452ge1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 29 Jun 2023 12:04:09 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35TC47JX19268186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 Jun 2023 12:04:07 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3781C20043; Thu, 29 Jun 2023 12:04:07 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C468320040; Thu, 29 Jun 2023 12:04:06 +0000 (GMT) Received: from [9.144.158.239] (unknown [9.144.158.239]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 29 Jun 2023 12:04:06 +0000 (GMT) Message-ID: <91dc3a14-4f1b-ebff-69d7-ff15469b5dcb@linux.ibm.com> Date: Thu, 29 Jun 2023 14:04:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2 0/9] Introduce SMT level and add PowerPC support Content-Language: fr To: Michael Ellerman , Sachin Sant Cc: linuxppc-dev , linux-arch@vger.kernel.org, dave.hansen@linux.intel.com, open list , Ingo Molnar , bp@alien8.de, npiggin@gmail.com, tglx@linutronix.de References: <20230628100558.43482-1-ldufour@linux.ibm.com> <88E208A6-F4E0-4DE9-8752-C9652B978BC6@linux.ibm.com> <87edluh6ce.fsf@mail.lhotse> From: Laurent Dufour In-Reply-To: <87edluh6ce.fsf@mail.lhotse> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 0UOBMfegDE_I71F22zNx5oVM0tK1OamE X-Proofpoint-GUID: UpmLjj2GgeXEOoGf8Ebdt0bsAN_eXqAi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-29_03,2023-06-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 mlxscore=0 spamscore=0 bulkscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306290108 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 29/06/2023 à 13:10, Michael Ellerman a écrit : > Sachin Sant writes: >>> On 28-Jun-2023, at 3:35 PM, Laurent Dufour wrote: >>> >>> I'm taking over the series Michael sent previously [1] which is smartly >>> reviewing the initial series I sent [2]. This series is addressing the >>> comments sent by Thomas and me on the Michael's one. >>> >>> Here is a short introduction to the issue this series is addressing: >>> >>> When a new CPU is added, the kernel is activating all its threads. This >>> leads to weird, but functional, result when adding CPU on a SMT 4 system >>> for instance. >>> >>> Here the newly added CPU 1 has 8 threads while the other one has 4 threads >>> active (system has been booted with the 'smt-enabled=4' kernel option): >>> >>> ltcden3-lp12:~ # ppc64_cpu --info >>> Core 0: 0* 1* 2* 3* 4 5 6 7 >>> Core 1: 8* 9* 10* 11* 12* 13* 14* 15* >>> >>> This mixed SMT level may confused end users and/or some applications. >>> >> >> Thanks for the patches Laurent. >> >> Is the SMT level retained even when dynamically changing SMT values? >> I am observing difference in behaviour with and without smt-enabled >> kernel command line option. >> >> When smt-enabled= option is specified SMT level is retained across >> cpu core remove and add. >> >> Without this option but changing SMT level during runtime using >> ppc64_cpu —smt=, the SMT level is not retained after >> cpu core add. > > That's because ppc64_cpu is not using the sysfs SMT control file, it's > just onlining/offlining threads manually. > > If you run: > $ ppc64_cpu --smt=4 > > And then also do: > > $ echo 4 > /sys/devices/system/cpu/smt/control > > It should work as expected? > > ppc64_cpu will need to be updated to do that automatically. Hi Sachin and Michael, Yes, ppc64_cpu will need an update, and I have a patch ready to be sent once this series will be accepted. By the way, I've a fix for the build issue reported against the patch 6/9. I'll send a v3 soon. Cheers, Laurent.