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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A537EC43219 for ; Fri, 8 Oct 2021 15:22:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B90F6101A for ; Fri, 8 Oct 2021 15:22:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242950AbhJHPYf (ORCPT ); Fri, 8 Oct 2021 11:24:35 -0400 Received: from foss.arm.com ([217.140.110.172]:58598 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242780AbhJHPYd (ORCPT ); Fri, 8 Oct 2021 11:24:33 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EF3811063; Fri, 8 Oct 2021 08:22:37 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9B44F3F66F; Fri, 8 Oct 2021 08:22:29 -0700 (PDT) From: Valentin Schneider To: Barry Song <21cnbao@gmail.com> Cc: LKML , LAK , linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Peter Zijlstra , Aubrey Li , Barry Song , Tim Chen , Jonathan Cameron , Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Yoshinori Sato , Rich Felker , "David S. Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86 , "H. Peter Anvin" , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Arnd Bergmann , Linus Walleij , Geert Uytterhoeven , Andrew Morton , Anshuman Khandual , Mike Rapoport , Mark Rutland , Ard Biesheuvel , YiFei Zhu , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Kefeng Wang , Sergei Trofimovich , David Hildenbrand , Randy Dunlap , Masahiro Yamada , Kees Cook , Nathan Chancellor , Nick Desaulniers , Chris Down , Vipin Sharma , Rasmus Villemoes , Daniel Borkmann , Vlastimil Babka , Frederic Weisbecker , Hugh Dickins , Michal Hocko Subject: Re: [PATCH 2/2] sched: Centralize SCHED_{SMT, MC, CLUSTER} definitions In-Reply-To: References: <20211008115347.425234-1-valentin.schneider@arm.com> <20211008115347.425234-3-valentin.schneider@arm.com> Date: Fri, 08 Oct 2021 16:22:27 +0100 Message-ID: <87bl3zlex8.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On 09/10/21 01:37, Barry Song wrote: > On Sat, Oct 9, 2021 at 12:54 AM Valentin Schneider > wrote: >> >> Barry recently introduced a new CONFIG_SCHED_CLUSTER, and discussions >> around that highlighted that every architecture redefines its own help text >> and dependencies for CONFIG_SCHED_SMT and CONFIG_SCHED_MC. >> >> Move the definition of those to scheduler's Kconfig to centralize help text >> and generic dependencies (i.e. SMP). Make them depend on a matching >> ARCH_SUPPORTS_SCHED_* which the architectures can select with the relevant >> architecture-specific dependency. >> >> s390 uses its own topology table (set_sched_topology()) and doesn't seem to >> cope without SCHED_MC or SCHED_SMT, so those remain untogglable. >> > > Hi Valentin, > Thanks! > I believe this is a cleaner way for Kconfig itself. But I am not quite sure this > is always beneficial of all platforms. It would be perfect if the patch has no > side effects and doesn't change the existing behaviour. But it has side effects > by changing the default N to Y on a couple of platforms. > So x86 has it default yes, and a lot of others (e.g. arm64) have it default no. IMO you don't gain much by disabling them. SCHED_MC and SCHED_CLUSTER only control the presence of a sched_domain_topology_level - if it's useless it gets degenerated at domain build time. Some valid reasons for not using them is if the architecture defines its own topology table (e.g. powerpc has CACHE and MC levels which are not gated behind any CONFIG). SCHED_SMT has an impact on code generated in sched/core.c, but that is also gated by a static key. So I'd say having them default yes is sensible. I'd even say we should change the "If unsure say N here." to "Y".