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