Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2468645pxb; Fri, 8 Oct 2021 08:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn9eVVPXnA5mOF5MmTb2TyXWRjeKc4pZs7RggBhGXEg8OKDUjvkp07dikqr22qt8uv9/DD X-Received: by 2002:a05:6402:510b:: with SMTP id m11mr15807082edd.258.1633706680388; Fri, 08 Oct 2021 08:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633706680; cv=none; d=google.com; s=arc-20160816; b=JuBtJeoJ/byfuLgUiF1ngXL+E1h6br12oeQUcJi5Y0WRsVMZwPdSGRu8a7fi6WdnAQ nqHoOtXJLZ+7mEwbXO2fi1Db/NtSaoADpByxA9sZfjwcCWJ+deOpTfV7mMtShS3LwGSh dZTjOpCR6MgEW6Vgl/oS6R9ECtUhgg4GlAfZo7Cqn0UWlrrcICYh6PSvlaSRcCHeaDmV 6tUqoT9TOrjVon3ugoVEBsTg/CIvdFX5mWlKYBnR39wS/Vb2x0YGSSF005Ark9pEt9K+ PbpzRoeZWtzdcPwUmYJtIfRPxAQXuzGKOWbreoFMbjI6bPBLehfJwkeJFG6dH8Xw6DFl HcoQ== 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:from; bh=qXHSkkIb6JgG7cOJMS7xSl0G04NUf0nejzElFbgRrSs=; b=hkzOc+nhFExfHQvbmXJnT7zpuxNI1YD8FRoF/A//ZT47jEb3z82J31/Lm+3cj2qGYr /zyCN5ytzxnzqbAWXVA0CEctcsRKtGJbESVK1xENOyD7iqvJfWWoeqSfumOQ30BuM7Ux HgzhWqUUuXp2N7baNo9wLqrk4Wzb65aaIj8FpqCzbc+BWl+8pt1A2DqdiBMK5R4cV58T 0CZkF+O9RB9GeuG5TzduQ8o62xwzSYLhaCdRUJ66rqpOFYM5hjWvG/MuvItV1GzjlIYW NeQeZR4cJHVPN9H1rZmXVU4I17nGdkW+07yK1d8XxgxhWPF7WNPgnHSIPuuTFK/C/1ru ZSDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu3si3599514ejb.435.2021.10.08.08.24.13; Fri, 08 Oct 2021 08:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242945AbhJHPYf (ORCPT + 99 others); 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-kernel@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".