Bug 121121
Summary: | Kernel v4.7-rc5 - performance degradation upto 40% after disabling and re-enabling a core | ||
---|---|---|---|
Product: | Process Management | Reporter: | Jirka Hladky (hladky.jiri) |
Component: | Scheduler | Assignee: | Ingo Molnar (mingo) |
Status: | NEW --- | ||
Severity: | normal | CC: | a.p.zijlstra, hladky.jiri, jeder, kkolakow, mingo, seberm |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | v4.7-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | Script to reproduce the problem |
Description
Jirka Hladky
2016-06-28 23:10:02 UTC
Created attachment 221421 [details]
Script to reproduce the problem
It assumes that working directory is ~/NPB3.3.1/NPB3.3-OMP and under bin directory there is "lu.C.x" binary.
It turns out that lu.C.x results show quite big variation and tests have to be repeated several times and mean value of real time has to be used to get reliable results. There is NO regression on following CPUs 4x Xeon(R) CPU E5-4610 v2 @ 2.30GHz 4x Xeon(R) CPU E5-2690 v3 @ 2.60GHz but there is regression (slow down by factor 6x) on AMD Opteron(TM) Processor 6272 Kernel 4.7.0-0.rc7.git0.1.el7.x86_64 real_time to run ./lu.C.x benchmark (mean value out of 10 runs) Right after boot: 273 seconds After disabling and enabling a core: 1702 seconds! WORKLOG ========================================================================== Jiri Olsa is working on a patch. This is the latest update from Jiri Olsa: ========================================================================== Jirka, Peter and Jean-Pierre reported performance drop on some cpus after making cpu offline and online again. The reason is the kernel logic that falls back to SMT level topology if more than one node is detected within CPU package. During the system boot this logic cuts out the DIE topology level and numa code adds NUMA level on top of this. After the boot if you reboot make the cpu offline and online again, this logic resets the SMT level topology, removing whole NUMA level stuff. Ensuring the SMT topology fallback happens only once during the boot so the NUMA topology level is kept once it's built. This problem is one of the issues reported in the wastedcores article [1]. There's similar patch to this issue attached to the article [2]. [1] https://github.com/jplozi/wastedcores [2] https://github.com/jplozi/wastedcores/blob/master/patches/missing_sched_domains_linux_4.1.patch Cc: Jean-Pierre Lozi <jplozi@unice.fr> Cc: Jirka Hladky <jhladky@redhat.com> Cc: Petr Surý <psury@redhat.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- arch/x86/kernel/smpboot.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 2a6e84a30a54..f2a769b2b3fe 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -487,7 +487,17 @@ static struct sched_domain_topology_level numa_inside_package_topology[] = { */ static void primarily_use_numa_for_topology(void) { - set_sched_topology(numa_inside_package_topology); + static bool once; + + /* + * We need to run it only during boot, once we are + * here due to getting cpu online again we have already + * NUMA topology setup done. + */ + if (!once) { + set_sched_topology(numa_inside_package_topology); + once = true; + } } void set_cpu_sibling_map(int cpu) WORKLOG fixed by following upstream post: http://marc.info/?l=linux-kernel&m=147337376415456&w=2 |