linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Barry Song <21cnbao@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	LAK <linux-arm-kernel@lists.infradead.org>,
	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" <peterz@infradead.org>,
	"Aubrey Li" <aubrey.li@linux.intel.com>,
	"Barry Song" <song.bao.hua@hisilicon.com>,
	"Tim Chen" <tim.c.chen@linux.intel.com>,
	"Jonathan Cameron" <jonathan.cameron@huawei.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Helge Deller" <deller@gmx.de>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Rich Felker" <dalias@libc.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Borislav Petkov" <bp@alien8.de>, x86 <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Dietmar Eggemann" <dietmar.eggemann@arm.com>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Ben Segall" <bsegall@google.com>, "Mel Gorman" <mgorman@suse.de>,
	"Daniel Bristot de Oliveira" <bristot@redhat.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Anshuman Khandual" <anshuman.khandual@arm.com>,
	"Mike Rapoport" <rppt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"YiFei Zhu" <yifeifz2@illinois.edu>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Kefeng Wang" <wangkefeng.wang@huawei.com>,
	"Sergei Trofimovich" <slyfox@gentoo.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Masahiro Yamada" <masahiroy@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Chris Down" <chris@chrisdown.name>,
	"Vipin Sharma" <vipinsh@google.com>,
	"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Hugh Dickins" <hughd@google.com>,
	"Michal Hocko" <mhocko@kernel.org>
Subject: Re: [PATCH 2/2] sched: Centralize SCHED_{SMT, MC, CLUSTER} definitions
Date: Fri, 08 Oct 2021 16:22:27 +0100	[thread overview]
Message-ID: <87bl3zlex8.mognet@arm.com> (raw)
In-Reply-To: <CAGsJ_4wqtcOdsFDzR98PFbjxRyTqzf7P3p3erup84SXESYonYw@mail.gmail.com>

On 09/10/21 01:37, Barry Song wrote:
> On Sat, Oct 9, 2021 at 12:54 AM Valentin Schneider
> <valentin.schneider@arm.com> 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".

  reply	other threads:[~2021-10-08 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 11:53 [PATCH 0/2] sched: cleanup CONFIG_SCHED_MC & friends Valentin Schneider
2021-10-08 11:53 ` [PATCH 1/2] sched: Move Kconfig.preempt to sched/Kconfig Valentin Schneider
2021-10-08 11:53 ` [PATCH 2/2] sched: Centralize SCHED_{SMT, MC, CLUSTER} definitions Valentin Schneider
2021-10-08 12:37   ` Barry Song
2021-10-08 15:22     ` Valentin Schneider [this message]
2021-10-15 13:04       ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bl3zlex8.mognet@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=21cnbao@gmail.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=aubrey.li@linux.intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=borntraeger@de.ibm.com \
    --cc=bp@alien8.de \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=chris@chrisdown.name \
    --cc=dalias@libc.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=david@redhat.com \
    --cc=deller@gmx.de \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=juri.lelli@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rasmusvillemoes.dk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rppt@kernel.org \
    --cc=slyfox@gentoo.org \
    --cc=song.bao.hua@hisilicon.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tim.c.chen@linux.intel.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vbabka@suse.cz \
    --cc=vincent.guittot@linaro.org \
    --cc=vipinsh@google.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yifeifz2@illinois.edu \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).