Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp299908rwl; Wed, 29 Mar 2023 01:51:50 -0700 (PDT) X-Google-Smtp-Source: AKy350bdDNt7x3ySlO+qGTd4COfoX4RKsZcXO0ujbESA0TU29ElakS5v23ISQqNgE1T4KJxdD3pP X-Received: by 2002:a62:5f82:0:b0:627:e42f:b76d with SMTP id t124-20020a625f82000000b00627e42fb76dmr14140625pfb.12.1680079910223; Wed, 29 Mar 2023 01:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680079910; cv=none; d=google.com; s=arc-20160816; b=hJHpcKBJp7AfjVLRRKWg3aURPFg4IcZwRTRBdZ9xHHPnZy6fZQ+f8fEoKSJBk4IiG3 JqWpsdo7FDwVTrhIzgyD/3kTbsphUjU6MR4rqlbNUhhdNcHrTZfpcP/vIWxDamSDIOGw t1QnhyHnOQPxYNvprfE8ulvUjrO/2R9JsB6bcqfhNLDIUt6jYLbWtFD2EwaJutVZv96Q zwIwhIsESu98jcqSkZ+sGnFotgwhm9adTugJxA1mLsQoZNCQJVaaxXOOgT+8fDjtZDlJ KEVvkcL0ZciTGIV/DOs5OPYa1JxM0bUofLefdoruburfcbglZ7XOhdMSp/bwf9Wlzq7F ZwIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tu8D8sNJ5RV0W3AuFiycIVvG6n0AuLvN4txSs88tZ2E=; b=gVXke0Fe8gKtr06mxRz+dAb7pCOp2yL7sZDf6S5f4vbDyr/0rzC3zXleXz5sHG19p8 ncV2MSmID8NcCuK3DyWIWd2ATyEbOEtZRoqSKpB6twyxIgt933NEX6D/5Y4jOvsOzD7P nWl/sRbJy9eBxTcKetwM5XQChXBZJUNniyCgSZDnRbr7bJCXidzFGd8UKsSIDMaWxyXg HYepCbfB/XSDcZ2NPqp7RVIze9gkLLpuD3xMMWRaMVCF5AHtDdJKgaWnWc/rSwcDVaSD nuiNH6XWiLDoEJWIrtpwqDq18/kCT7Ycn1Fz4xlFIRKC/iUPgrswF4DDD0zF2Zx3oGGg 6Ivg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=JiL4y62Z; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020a631e51000000b0050be9448847si30682486pgm.680.2023.03.29.01.51.38; Wed, 29 Mar 2023 01:51:50 -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=@infradead.org header.s=desiato.20200630 header.b=JiL4y62Z; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230384AbjC2IvR (ORCPT + 99 others); Wed, 29 Mar 2023 04:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231278AbjC2IvH (ORCPT ); Wed, 29 Mar 2023 04:51:07 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 769A32733 for ; Wed, 29 Mar 2023 01:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tu8D8sNJ5RV0W3AuFiycIVvG6n0AuLvN4txSs88tZ2E=; b=JiL4y62ZsZ1uxjqtNN9l2NqWSl wxFK6o6H4pWzhxVAQSDIXQNVDR9pMKbYaap0flqtbJgYCElstOCLDlAbI/ZULqUin+B0mfNOdsmnC 3toxNj3QkKeaWcpC6vNXDFdV2DWS2t6hEYTOD17aFe59/LrKoSStR1TqhbRQT+nxq86CY12GTC4oc duwoqyzBovddWn3KGZNYoRP2n2e76Up0t6hdkgKqJ9KJC07xYnxz7QWmkrWeFD50dq/1WxRcP93+g rYg2MU4TGWl4Ls13rt7Sz0OwILovO1FM6FZZtNF9EpmsgPnckV7RHBqy617mSrUTTWwwJK/eE8sej MEhM3vrA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1phRVg-006oAq-35; Wed, 29 Mar 2023 08:50:25 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 88D12300237; Wed, 29 Mar 2023 10:50:23 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 348AA262EE29D; Wed, 29 Mar 2023 10:50:23 +0200 (CEST) Date: Wed, 29 Mar 2023 10:50:23 +0200 From: Peter Zijlstra To: "Yang, WenYou" Cc: "Deucher, Alexander" , "Koenig, Christian" , "Pan, Xinhui" , "Quan, Evan" , "Limonciello, Mario" , bp@alien8.de, "jpoimboe@kernel.org" , "Phillips, Kim" , "tglx@linutronix.de" , "Yuan, Perry" , "Liang, Richard qi" , "Li, Ying" , "Liu, Kun" , "gpiccoli@igalia.com" , "amd-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 1/2] cpu/smt: add a notifier to notify the SMT changes Message-ID: <20230329085023.GO4253@hirez.programming.kicks-ass.net> References: <20230329015149.870132-1-WenYou.Yang@amd.com> <20230329015149.870132-2-WenYou.Yang@amd.com> <20230329071014.GC7701@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 On Wed, Mar 29, 2023 at 07:23:29AM +0000, Yang, WenYou wrote: > [AMD Official Use Only - General] ^^^ that has no business being in a public email. > Hi Peter, > > Thank you for your review. > > The purpose of the patch set is to improve the performance when playing game for some AMD APUs with SMT enabled/disabled. > > When change the SMT state on the fly through " echo on/off > /sys/devices/system/cpu/smt/control", the kernel needs to send a message to notify PMFW to adjust a variable's value, which impacts the performance. When top posting I normally ignore the email. When not wrapping email I typically get cranky. You 'win' *3* 'I cannot use email' trophies in a singly try. Surely AMD has a HOWTO somewhere you can read? So what do you want to have happen when someone goes and manually offlines all the SMT siblings using /sys/devices/system/cpu/cpu*/online ? I'm thinking that wants the same PMFW (whatever the heck that is) notification change done, right? If the answer is "yes", then your patch does not meet the goals and is inadequate.