From: Giovanni Gherdovich <firstname.lastname@example.org> To: Srinivas Pandruvada <email@example.com>, Thomas Gleixner <firstname.lastname@example.org>, Ingo Molnar <email@example.com>, Peter Zijlstra <firstname.lastname@example.org>, Borislav Petkov <email@example.com>, Len Brown <firstname.lastname@example.org>, "Rafael J . Wysocki" <email@example.com> Cc: firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, Mel Gorman <email@example.com>, Matt Fleming <firstname.lastname@example.org>, Viresh Kumar <email@example.com>, Juri Lelli <firstname.lastname@example.org>, Paul Turner <email@example.com>, Vincent Guittot <firstname.lastname@example.org>, Quentin Perret <email@example.com>, Dietmar Eggemann <firstname.lastname@example.org>, Doug Smythies <email@example.com>, Giovanni Gherdovich <firstname.lastname@example.org> Subject: [PATCH v4 0/6] Add support for frequency invariance for (some) x86 Date: Wed, 13 Nov 2019 13:46:48 +0100 [thread overview] Message-ID: <email@example.com> (raw) v3 at https://firstname.lastname@example.org/ Changes wrt v3: - Add definition of function set_arch_max_freq if !CONFIG_SMP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cover Letter from v3: v2 at https://email@example.com/ Changes wrt v2: - Removing the tick_disable mechanism. Frequency scale-invariance isn't just about helping schedutil choose better frequencies, but also providing the scheduler load balancer with better metrics. All users of PELT signals benefit from this feature. The tick_disable patch disabled frequency invariant calculation when a specific driver is in use (intel_pstate in active mode). - static_branch_enable(&arch_scale_freq_key) is now called earlier, right after we learn that X86_FEATURE_APERFMPERF is available. Previously Peter Z. commented "if we can't tell the max_freq we don't want to use the invariant stuff.". I've decided to do it differently: if we can't tell the max_freq, then it's because the CPU encodes max_freq in MSRs in a way this patch doesn't understand, and we assume max_p is the max_freq which seems like a safe bet. As a reminder, max_freq=max_p is encoded by setting arch_max_freq=1024 as default value. I'm open to feedback. - Refactoring the switch case statement in set_cpu_max_freq() as Rafael W. Now the first patch doesn't hint at what the following patch will bring along. - Handling the case were turbo is disabled at runtime and a _PPC ACPI notification is issued, as requested by Rafael W. This happens eg. when some laptop model is disconnected from AC. (Patch #6) - Handling all Intel x86_64 micro-arches. - A note for Srinivas P., who expressed concern for Atoms: on Atom CPUs the max_freq is set to the highest turbo level, as a power-efficiency oriented measure. In this way the ratio curr_freq/max_freq tends to be lower, PELT signals are consequently lower, and schedutil doesn't push too hard on speed. (Patches #4 and #5). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cover Letter from v2: v1 at https://firstname.lastname@example.org/ Changes wrt v1: - add x86-specific implementation of arch_scale_freq_invariant() using a static key that checks for the availability of APERF and MPERF - refer to GOLDMONT_D instead of GOLDMONT_X, according to recent rename - set arch_cpu_freq to 1024 from x86_arch_scale_freq_tick_disable() to prevent PELT from being fed stale data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cover Letter from v1: This is a resend with of Peter Zijlstra's patch to support frequency scale-invariance on x86 from May 2018 [see 1]. I've added some modifications and included performance test results. If Peter doesn't mind, I'm slapping my name on it :) The changes from Peter's original implementation are: 1) normalizing against the 4-cores turbo level instead or 1-core turbo 2) removing the run-time search for when the above value isn't found in the various Intel MSRs -- the base frequency value is taken in that case. The section "4. KNOWN LIMITATIONS" in the first patch commit message addresses the reason why this approach was dropped back in 2018, and explains that the performance gains outweight that issue. The second patch from Srinivas is taken verbatim from the May 2018 submission as it still applies. I apologies for the length of patch #1 commit message; I've made a table of contents with summaries of each section that should make easier to skim through the content. This submission incorporates the feedback and requests for additional tests received during the presentation made at OSPM 2019 in Pisa three months ago.  https://email@example.com/ Giovanni Gherdovich (6): x86,sched: Add support for frequency invariance x86,sched: Add support for frequency invariance on SKYLAKE_X x86,sched: Add support for frequency invariance on XEON_PHI_KNL/KNM x86,sched: Add support for frequency invariance on ATOM_GOLDMONT* x86,sched: Add support for frequency invariance on ATOM x86: intel_pstate: handle runtime turbo disablement/enablement in freq. invariance arch/x86/include/asm/topology.h | 28 ++++ arch/x86/kernel/smpboot.c | 324 +++++++++++++++++++++++++++++++++++++++- drivers/cpufreq/intel_pstate.c | 1 + kernel/sched/core.c | 1 + kernel/sched/sched.h | 7 + 5 files changed, 360 insertions(+), 1 deletion(-) -- 2.16.4
next reply other threads:[~2019-11-13 12:41 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-13 12:46 Giovanni Gherdovich [this message] 2019-11-13 12:46 ` [PATCH v4 1/6] x86,sched: Add support for frequency invariance Giovanni Gherdovich 2019-11-24 7:49 ` Doug Smythies 2019-11-25 8:16 ` Doug Smythies 2019-11-25 9:16 ` Mel Gorman 2019-11-25 16:06 ` Giovanni Gherdovich 2019-11-26 5:59 ` Doug Smythies 2019-11-26 15:20 ` Giovanni Gherdovich 2019-11-27 7:32 ` Doug Smythies 2019-11-28 22:48 ` Doug Smythies 2019-12-19 10:48 ` Qais Yousef 2019-12-23 7:47 ` Doug Smythies 2019-12-23 14:07 ` Qais Yousef 2019-12-23 14:40 ` Qais Yousef 2019-12-23 16:34 ` Doug Smythies 2019-12-23 19:10 ` Qais Yousef 2019-12-24 1:16 ` Doug Smythies 2019-12-24 11:08 ` Qais Yousef 2019-12-02 16:34 ` Ionela Voinescu 2019-12-06 11:57 ` Giovanni Gherdovich 2019-12-18 19:34 ` Peter Zijlstra 2019-12-19 20:27 ` Giovanni Gherdovich 2019-11-13 12:46 ` [PATCH v4 2/6] x86,sched: Add support for frequency invariance on SKYLAKE_X Giovanni Gherdovich 2019-12-18 20:06 ` Peter Zijlstra 2019-12-19 20:29 ` Giovanni Gherdovich 2019-11-13 12:46 ` [PATCH v4 3/6] x86,sched: Add support for frequency invariance on XEON_PHI_KNL/KNM Giovanni Gherdovich 2019-12-18 20:22 ` Peter Zijlstra 2019-12-19 20:32 ` Giovanni Gherdovich 2019-11-13 12:46 ` [PATCH v4 4/6] x86,sched: Add support for frequency invariance on ATOM_GOLDMONT* Giovanni Gherdovich 2019-11-13 12:46 ` [PATCH v4 5/6] x86,sched: Add support for frequency invariance on ATOM Giovanni Gherdovich 2019-11-13 16:50 ` Srinivas Pandruvada 2019-11-15 10:34 ` Giovanni Gherdovich 2019-11-13 12:46 ` [PATCH v4 6/6] x86: intel_pstate: handle runtime turbo disablement/enablement in freq. invariance Giovanni Gherdovich 2019-12-18 20:37 ` [PATCH v4 0/6] Add support for frequency invariance for (some) x86 Peter Zijlstra 2019-12-19 20:33 ` Giovanni Gherdovich
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 \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH v4 0/6] Add support for frequency invariance for (some) x86' \ /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
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).