From: Ingo Molnar <mingo@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: peterz@infradead.org, tim.c.chen@linux.intel.com, hpa@zytor.com,
srinivas.pandruvada@linux.intel.com,
linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/core] x86: Enable Intel Turbo Boost Max Technology 3.0
Date: Mon, 28 Nov 2016 09:51:02 +0100 [thread overview]
Message-ID: <20161128085102.GA17652@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1611251951360.3602@nanos>
* Thomas Gleixner <tglx@linutronix.de> wrote:
> On Fri, 25 Nov 2016, Ingo Molnar wrote:
>
> >
> > * tip-bot for Tim Chen <tipbot@zytor.com> wrote:
> >
> > > Commit-ID: 5e76b2ab36b40ca33023e78725bdc69eafd63134
> > > Gitweb: http://git.kernel.org/tip/5e76b2ab36b40ca33023e78725bdc69eafd63134
> > > Author: Tim Chen <tim.c.chen@linux.intel.com>
> > > AuthorDate: Tue, 22 Nov 2016 12:23:55 -0800
> > > Committer: Thomas Gleixner <tglx@linutronix.de>
> > > CommitDate: Thu, 24 Nov 2016 20:44:19 +0100
> > >
> > > x86: Enable Intel Turbo Boost Max Technology 3.0
> >
> > This patch doesn't build:
> >
> > Note that this patch has to be redone anyway, as it won't even build:
>
> The branch where I merged it to builds fine.
Indeed you are right - asm/mutex.h is gone in locking/core, so this is a semantic
merge conflict, not a build failure.
> Though, yes I missed the asm/mutex.h include which obviously should be
> linux/mutex.h
>
> > > +#include <linux/sched.h>
> > > +#include <linux/cpumask.h>
> > > +#include <linux/cpuset.h>
> > > +#include <asm/mutex.h>
> > > +#include <linux/sched.h>
> > > +#include <linux/sysctl.h>
> > > +#include <linux/nodemask.h>
> >
> > arch/x86/kernel/itmt.c:26:23: fatal error: asm/mutex.h: No such file or directory
> >
> > > +config SCHED_ITMT
> > > + bool "Intel Turbo Boost Max Technology (ITMT) scheduler support"
> > > + depends on SCHED_MC && CPU_SUP_INTEL && X86_INTEL_PSTATE
> > > + ---help---
> > > + ITMT enabled scheduler support improves the CPU scheduler's decision
> > > + to move tasks to cpu core that can be boosted to a higher frequency
> > > + than others. It will have better performance at a cost of slightly
> > > + increased overhead in task migrations. If unsure say N here.
> >
> > Argh, so the 'itmt' name really sucks as well - could we please make it something
> > more obvious - like SCHED_INTEL_TURBO or so - and similarly rename the file as
> > well?
> >
> > The sched_intel_turbo.c file could thus host all things related to scheduler
> > support of turbo frequencies - it shouldn't be named after the Intel acronym of
> > the day...
>
> It would be nice to come up with such nitpicks during review. This thing went
> through 8 iterations, but nothing came up and I didn't mind the itmt naming.
Yeah, so I had to NAK an early iteration and didn't get around to doing a really
detailed review yet - and after (falsely) thinking it had a build failure I got
overly worked up about the bad naming: my bad and apologies!
So the code looks good to me but the naming still sucks a bit - I'm fine with
having the commits re-merged as-is and renaming the Kconfig variable to something
more expressive: I've done this in tip:sched/core and have fixed the asm/mutex.h
thing as well.
Wrt. improving the naming:
Firstly, popular tech news has coined the 'Turbo Boost Max' technology 'TBM' (TBM2
and TBM3) as the natural acronym of the Intel feature - not 'ITMT'. So to anyone
except people well aware of Intel acronyms the term 'ITMT' will be pretty
meaningless.
Does something more generic like SCHED_MC_PRIO (as an extension to SCHED_MC) work
with everyone? Intel Turbo Max 3.0 is the current (only) implementation of it, but
I don't think the technology will stop at that stage as dies are getting larger
but thinner.
I also think the Kconfig text is somewhat misleading and the default-disabled
status is counterproductive:
+config SCHED_ITMT
+ bool "Intel Turbo Boost Max Technology (ITMT) scheduler support"
+ depends on SCHED_MC && CPU_SUP_INTEL && X86_INTEL_PSTATE
+ ---help---
+ ITMT enabled scheduler support improves the CPU scheduler's decision
+ to move tasks to cpu core that can be boosted to a higher frequency
+ than others. It will have better performance at a cost of slightly
+ increased overhead in task migrations. If unsure say N here.
... the extra cost of smarter CPU selection is IMHO overwhelmed by the negative
effects of not knowing about core frequency ordering, on most workloads.
A better default would be default-y I believe (that is what we do for CPU hardware
enablement typically), and a better description would be something like:
+config SCHED_MC_PRIO
+ bool "CPU core priorities scheduler support"
+ depends on SCHED_MC && CPU_SUP_INTEL && X86_INTEL_PSTATE
+ default y
+ ---help---
+ Intel Turbo Boost Max 3.0 enabled CPUs have a core ordering determined at
+ manufacturing time, which allows certain cores to reach higher turbo
+ frequencies (when running single threaded workloads) than others.
+
+ Enabling this kernel feature teaches the scheduler about the TBM3 priority
+ order of the CPU cores and adjusts the scheduler's CPU selection logic
+ accordingly, so that higher overall system performance can be achieved.
+
+ This feature will have no effect on CPUs without this feature.
+
+ If unsure say Y here.
If/when other architectures make use of this the Kconfig entry can be moved into
the scheduler Kconfig - but for the time being it can stay in arch/x86/.
Another variant would be to eliminate the Kconfig option altogether and make it a
natural feature of SCHED_MC (like it is in the core scheduler).
Thanks,
Ingo
next prev parent reply other threads:[~2016-11-28 8:51 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 20:23 [PATCH v8 0/8] Support Intel Turbo Boost Max Technology 3.0 Tim Chen
2016-11-22 20:23 ` [PATCH v8 1/8] sched: Extend scheduler's asym packing Tim Chen
2016-11-23 13:09 ` Peter Zijlstra
2016-11-23 17:32 ` Tim Chen
2016-11-24 13:25 ` [tip:sched/core] " tip-bot for Tim Chen
2016-11-22 20:23 ` [PATCH v8 2/8] x86/topology: Define x86's arch_update_cpu_topology Tim Chen
2016-11-24 19:52 ` [tip:x86/core] " tip-bot for Tim Chen
2016-11-22 20:23 ` [PATCH v8 3/8] x86: Enable Intel Turbo Boost Max Technology 3.0 Tim Chen
2016-11-24 19:52 ` [tip:x86/core] " tip-bot for Tim Chen
2016-11-25 8:19 ` Ingo Molnar
2016-11-25 8:39 ` Peter Zijlstra
2016-11-25 19:06 ` Thomas Gleixner
2016-11-28 8:51 ` Ingo Molnar [this message]
2016-11-28 17:35 ` Tim Chen
2016-11-28 23:22 ` Rafael J. Wysocki
2016-11-29 7:11 ` Ingo Molnar
2016-11-29 18:45 ` Tim Chen
2016-11-22 20:23 ` [PATCH v8 4/8] x86/sysctl: Add sysctl for ITMT scheduling feature Tim Chen
2016-11-24 19:53 ` [tip:x86/core] " tip-bot for Tim Chen
2016-11-28 8:56 ` [PATCH v8 4/8] " Borislav Petkov
2016-11-29 17:30 ` Tim Chen
2016-11-29 17:51 ` Borislav Petkov
2016-11-22 20:23 ` [PATCH v8 5/8] x86/sched: Add SD_ASYM_PACKING flags to x86 ITMT CPU Tim Chen
2016-11-24 19:53 ` [tip:x86/core] " tip-bot for Tim Chen
2016-11-22 20:23 ` [PATCH v8 6/8] acpi: bus: Enable HWP CPPC objects Tim Chen
2016-11-24 19:54 ` [tip:x86/core] acpi/bus: " tip-bot for Srinivas Pandruvada
2016-11-22 20:23 ` [PATCH v8 7/8] acpi: bus: Set _OSC for diverse core support Tim Chen
2016-11-24 19:54 ` [tip:x86/core] acpi/bus: " tip-bot for Srinivas Pandruvada
2016-11-22 20:24 ` [PATCH v8 8/8] cpufreq: intel_pstate: Use CPPC to get max performance Tim Chen
2016-11-24 19:55 ` [tip:x86/core] cpufreq/intel_pstate: " tip-bot for Rafael J. Wysocki
2016-12-07 19:06 ` [PATCH v8 8/8] cpufreq: intel_pstate: " Sebastian Andrzej Siewior
2016-12-07 23:12 ` Tim Chen
2016-12-07 23:29 ` Rafael J. Wysocki
2016-12-09 14:45 ` Sebastian Andrzej Siewior
2016-12-09 15:02 ` Rafael J. Wysocki
2016-12-09 23:52 ` [PATCH] ACPI / CPPC: Fix per-CPU pointers management Rafael J. Wysocki
2016-12-10 18:51 ` Sebastian Andrzej Siewior
2016-12-12 1:00 ` Rafael J. Wysocki
2016-12-14 2:26 ` Rafael J. Wysocki
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=20161128085102.GA17652@gmail.com \
--to=mingo@kernel.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.