Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1664179rwl; Fri, 31 Mar 2023 14:54:28 -0700 (PDT) X-Google-Smtp-Source: AKy350bqkm/Gcc+h8Qm2vlcz1lxEUyrBuNzHA3LSmpAg4CBGBKUxDMJWcTiMa2zozs9B+PWPG6Tu X-Received: by 2002:a17:90a:788f:b0:23d:2b53:1ae2 with SMTP id x15-20020a17090a788f00b0023d2b531ae2mr6677810pjk.3.1680299668635; Fri, 31 Mar 2023 14:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680299668; cv=none; d=google.com; s=arc-20160816; b=gSef0HlKOMtXWwerqJHUkMRAQW/cSAXqf7LgHEfGSKKX7Uoj2h8UDRot0ANj936KhI u+Dd9uYxAru3CVDDsCi+4kHC+Gap7iLGH+qz7KISTf03Z0uEM2mq5+bVue/OclQRwk1x XdYZy0/vnxEVqlx0RBItJlygpr3g/iPh4z24aixhPnwk3HfjMY++Y06d1Ygdx6njH6GV 9shhKrzQr8pxRwPPs8nhq0PCQONGcnKaQ0hZ4oQa2EQ74syK/q60H4ixohOPyKzB/z1C +e1G2BsC8oZu5LR+U5QAak9KMrfXrzu/wGYagEaViXF+/mTC7L8Os9E+mrB6VEIncnhH INqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=6Hyu7B5PMD/6Hjx3PVFsOPviX5E90ag0vc/ISSLayx4=; b=nYqPyVibG4yRGI1k1aGSSv9etaKkjrQoFXe5Ug2zhvKWlNgYVtAkpqYXl2UX8ytJ0v GKiplSgmuXDQE42g+bfNIGCSItaaUF3vF09yzAQQ+XtN4CdFPFwBFfSr+7KzfS9xs6J/ 54Uwi/5PhBpXfd955+PL3WC3tmR61oTV+Lt42N0iIpayOGgKbG9OHKCXGADt0pO1U7s5 9GNFl/QrttDLLJBJFH4wxWSPoEKGHzHdQ//FB8VKCmL10fgoPcuvOMc5bn9l7wK+X+a+ xDcnt+HBcifYzHsPC2X7hVIKXo4FPWKSupbYPFZq/oKDad1fuYkB4qunpKVSmhWVobye JJLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Jb+3UqWA; dkim=neutral (no key) header.i=@linutronix.de; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a17090adc0900b002342823b17asi2908038pjv.23.2023.03.31.14.54.16; Fri, 31 Mar 2023 14:54:28 -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=@linutronix.de header.s=2020 header.b=Jb+3UqWA; dkim=neutral (no key) header.i=@linutronix.de; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233308AbjCaVxk (ORCPT + 99 others); Fri, 31 Mar 2023 17:53:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233215AbjCaVx3 (ORCPT ); Fri, 31 Mar 2023 17:53:29 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ABE2CA0B for ; Fri, 31 Mar 2023 14:52:57 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1680299571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Hyu7B5PMD/6Hjx3PVFsOPviX5E90ag0vc/ISSLayx4=; b=Jb+3UqWAMcMCm/IW5t98tTatXDLNhFaDT2PAQ17N7MvuDRPIQFkECCVaAbMTNkBR1MSoS6 OtHV+jOQJqRzzsfWXBV4j6t8S/xrZ71Tmlud0yfIfr6OlEbZ9pzz5odKzezLIUeiXfmqCv e0QWbpYrH7zKpntNUUxHU67KPX3dNlO0P2VQ4lqs5hfrZF6+UVsuajR5ExtGkH+LWB3UXe c3fLQLLHgf7VrTC5GliyQ0W854umpcauoNH73Uag6ZKJFH+Ua0yTLw3J7JYFxpRviQrDJJ +GTLBGs4hYpCiV7RXNf/PsQIu1thkWu1iojooX+vWKVME7adcHIijjBmSzwjIw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1680299571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Hyu7B5PMD/6Hjx3PVFsOPviX5E90ag0vc/ISSLayx4=; b=mNy/akH/qQWxhte5iHap01uZz88g/ZXpEUvUU7mQYy1cdFIZMk+SuHC23Ln7e1K3HStM76 MZWc70grf26T8wAQ== To: "Yang, WenYou" , Peter Zijlstra Cc: "Deucher, Alexander" , "Koenig, Christian" , "Pan, Xinhui" , "Quan, Evan" , "Limonciello, Mario" , "bp@alien8.de" , "jpoimboe@kernel.org" , "Phillips, Kim" , "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 In-Reply-To: References: <20230329015149.870132-1-WenYou.Yang@amd.com> <20230329015149.870132-2-WenYou.Yang@amd.com> <20230329071014.GC7701@hirez.programming.kicks-ass.net> <20230329085023.GO4253@hirez.programming.kicks-ass.net> Date: Fri, 31 Mar 2023 23:52:50 +0200 Message-ID: <87pm8osi4t.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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_PASS 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 Fri, Mar 31 2023 at 05:49, WenYou Yang wrote: Removing pointlessly copied mail headers. Please fix your email client >> > >> > 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 don't consider this situation. Any suggestions will be deeply appreciated. > > Hi Peter, > > I don't find a good method to handle this situation. > Yes, manually offlining all the SMT sibling will get the same result of SMT disabling on the fly. > > Actually, the normal way to enable/disable SMT on the fly is to echo on/off > /sys/device/system/cpu/smt/control That's the most convenient way, right. But why do we need a kernel notifier for this, if you can do the same with a sysfs knob for your driver? Then user space can fiddle with SMT control in sysfs and afterwards tell the driver that it should reconfigure. That makes a ton more sense than this random notifier. Thanks, tglx