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 76310CCD18D for ; Tue, 14 Oct 2025 12:44:16 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4cmDRy6tZSz30V1; Tue, 14 Oct 2025 23:44:14 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=209.85.221.171 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1760445854; cv=none; b=JNxPFr5ksDNE5ltYNsaU6clHGcw3AtBwGuBxsqpOWqKX6Z/5MqN4J8/tE6RRTQ5PCQQnYIzz94+AW8/XufwpcKOERfQa1JdsMri5snOfGfOxwBV4001Kyw+fp64KvZsl52Fw1CXrtYmPaLXRkJGvVGoCQnVmNBgEuXmAZkFHWz/34srJiAV22tGsplF1RwrBBPYd6rD/JqnhyOrgly8Nu1ezKLmPwlZGfeEd3ETquKlY3D6BpKvzkefRu7TfBOVfZjmGcvbFes5C8Pj3QUVlcM8c//GPxsWguzkDJ6VzIHmTT7W8msfe7LBTJ5YjtGO5XsaStik5J0yOMZBgTE0xbw== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1760445854; c=relaxed/relaxed; bh=sNxEU7KyfBYhfmf3Lx2LLvPMpGLQ7HkB7d0pkrjoK9E=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Eoyeh040MYC0QWEOs0DNX96qLp+k/Khj52YWPTgR//mooAOT7i4CsdzjgECMqMedQywP6YV/xkBt9fuPHpSQUzqvW28xF0z+yDU2uzrLL1hm6hd2YTEzLqziTjJ0PR5tWkhgXvTc5Usxkeo3Uxd7pIS4eUJFD1fO71zMiem4jozvAKVPHsF4OVParDmjK4KLT2+GCkogWF0R8IS2NeTd28Yo7Evf7Pk0ze+5EiRbpO3iBnqzX5MVetjBaEf+EEidiSwfPU6vzQMQx/x8WdZF38tAYZ04CiSsd6TYl/mvQCHrL0IHkcXsDPdOsRo+boQL5RlwD7JovN7VjWDz9k8DkQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass (client-ip=209.85.221.171; helo=mail-vk1-f171.google.com; envelope-from=geert.uytterhoeven@gmail.com; receiver=lists.ozlabs.org) smtp.mailfrom=gmail.com Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.221.171; helo=mail-vk1-f171.google.com; envelope-from=geert.uytterhoeven@gmail.com; receiver=lists.ozlabs.org) Received: from mail-vk1-f171.google.com (mail-vk1-f171.google.com [209.85.221.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4cmDRx2kf8z30M0 for ; Tue, 14 Oct 2025 23:44:12 +1100 (AEDT) Received: by mail-vk1-f171.google.com with SMTP id 71dfb90a1353d-554ff1682c8so1458382e0c.1 for ; Tue, 14 Oct 2025 05:44:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760445849; x=1761050649; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sNxEU7KyfBYhfmf3Lx2LLvPMpGLQ7HkB7d0pkrjoK9E=; b=gOlU14rX2H0S+a3A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md47WQW9Vm+FKT0KKezRW94eO66avg54E7FrItdRMS7a+W/lwXJ1ow/7Y8umYKjJDEzA== X-Received: by 2002:a05:6122:8c5:b0:554:afe3:1fc4 with SMTP id 71dfb90a1353d-554b8b88f4bmr9758709e0c.9.1760445849489; Tue, 14 Oct 2025 05:44:09 -0700 (PDT) Received: from mail-vs1-f49.google.com (mail-vs1-f49.google.com. [209.85.217.49]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-554d7ce706csm4139754e0c.0.2025.10.14.05.44.09 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Oct 2025 05:44:09 -0700 (PDT) Received: by mail-vs1-f49.google.com with SMTP id ada2fe7eead31-58de3ab1831so4828137137.3 for ; Tue, 14 Oct 2025 05:44:09 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXli5MS7DhJC+np/1sOi5H1SSo4UiXkM6EykWppPY1YJWPXEaeMHRs7zws4IpL1QHxLMtVpZXd72UMRaxw=@lists.ozlabs.org X-Received: by 2002:a05:6102:a51:b0:5d6:3554:2dbb with SMTP id ada2fe7eead31-5d635542e5dmr527665137.16.1760445443647; Tue, 14 Oct 2025 05:37:23 -0700 (PDT) X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 References: <20250826041319.1284-1-kprateek.nayak@amd.com> <20250826041319.1284-5-kprateek.nayak@amd.com> <609a980b-cbe3-442b-a492-91722870b156@csgroup.eu> <20250826080706.GC3245006@noisy.programming.kicks-ass.net> <20250826094358.GG3245006@noisy.programming.kicks-ass.net> <20251014094210.GQ3245006@noisy.programming.kicks-ass.net> In-Reply-To: <20251014094210.GQ3245006@noisy.programming.kicks-ass.net> From: Geert Uytterhoeven Date: Tue, 14 Oct 2025 14:37:11 +0200 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWC3_aMtxy2dnl_M3on8VhWCTedTTMBJW4khUhDoS9xyzcvkRTZ1BETpTHo Message-ID: Subject: Re: [PATCH v7 4/8] powerpc/smp: Introduce CONFIG_SCHED_MC to guard MC scheduling bits To: Peter Zijlstra Cc: Christophe Leroy , K Prateek Nayak , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Juri Lelli , Vincent Guittot , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , thomas.weissschuh@linutronix.de, Li Chen , Bibo Mao , Mete Durlu , Tobias Huschle , Easwar Hariharan , Guo Weikang , "Rafael J. Wysocki" , Brian Gerst , Patryk Wlazlyn , Swapnil Sapkal , "Yury Norov [NVIDIA]" , Sudeep Holla , Jonathan Cameron , Andrea Righi , Yicong Yang , Ricardo Neri , Tim Chen , Vinicius Costa Gomes Content-Type: text/plain; charset="UTF-8" Hoi Peter, On Tue, 14 Oct 2025 at 11:42, Peter Zijlstra wrote: > On Tue, Oct 14, 2025 at 11:25:53AM +0200, Geert Uytterhoeven wrote: > > On Thu, 28 Aug 2025 at 14:57, Peter Zijlstra wrote: > > > Now, when I look at unifying those config options (there's a metric ton > > > of crap that's duplicated in the arch/*/Kconfig), I end up with something > > > like the below. > > > > > > And while that isn't exact, it is the closest I could make it without > > > making a giant mess of things. > > > > > > WDYT? > > > > Thanks for your patch, which is now commit 7bd291abe2da09f5 ("sched: > > Unify the SCHED_{SMT,CLUSTER,MC} Kconfig") in v6.18-rc1. > > > > > --- a/arch/Kconfig > > > +++ b/arch/Kconfig > > > @@ -41,6 +41,44 @@ config HOTPLUG_SMT > > > config SMT_NUM_THREADS_DYNAMIC > > > bool > > > > > > +config ARCH_SUPPORTS_SCHED_SMT > > > + bool > > > + > > > +config ARCH_SUPPORTS_SCHED_CLUSTER > > > + bool > > > + > > > +config ARCH_SUPPORTS_SCHED_MC > > > + bool > > > + > > > +config SCHED_SMT > > > + bool "SMT (Hyperthreading) scheduler support" > > > + depends on ARCH_SUPPORTS_SCHED_SMT > > > + default y > > > > This is now enabled by default everywhere, while it was disabled by > > default on most architectures before... > > I'm not sure ARCH_SUPPORTS_SCHED_SMT counts as everywhere, but yes. > A fair deal of the architectures had all this default yes, and I had to > pick something. Can't make an omelette without breaking an egg and all > that :/ OK. > > > + help > > > + Improves the CPU scheduler's decision making when dealing with > > > + MultiThreading at a cost of slightly increased overhead in some > > > + places. If unsure say N here. > > > > So it should default to n? > > That's just help text that got carried around. Many of the architectures > that had default y still had this text on. I suppose we can change it if > someone cares. Please do so. > > If it is really needed on some architectures or platforms, I guess > > they can still select it explicitly? > > There were 4 cases: > > - arch doesn't support SMT > - arch supports SMT and lets user pick, default Y > - arch supports SMT and lets user pick, default N > - arch mandates SMT > > Of those 3 are still possible, the one we lost is the default N case. > > Old configs that have =N will continue to have N. New configs might end > up with Y. > > Why is this a problem? While old .config files will see no changes, old defconfig files do need updates. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds