Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 874403 Details for
Bug 1065304
kernel/sched: incorrect setup of sched_group->cpu_power for NUMA systems
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
sched/numa: fix cpu_power initialization
0001-sched-numa-fix-cpu_power-initialization.patch (text/plain), 2.73 KB, created by
Radim Krčmář
on 2014-03-14 12:46:26 UTC
(
hide
)
Description:
sched/numa: fix cpu_power initialization
Filename:
MIME Type:
Creator:
Radim Krčmář
Created:
2014-03-14 12:46:26 UTC
Size:
2.73 KB
patch
obsolete
>From a8afb9b3e9b7cb1c88949b7148f958d2f1f2a216 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com> >Date: Wed, 5 Mar 2014 14:05:46 +0100 >Subject: [RHEL6.6 kernel PATCH] sched/numa: fix cpu_power initialization >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >bug: https://bugzilla.redhat.com/show_bug.cgi?id=1065304 >brew: https://brewweb.devel.redhat.com/brew/taskinfo?taskID=7194671 >Tested by me on hp-dl585-02, ibm-ls22-05 and weird-topology kvm guests. >A functionally identical patch was verified by the reporter. >This patch has no upstream equivalent. > >Our problem lies in init_numa_sched_groups_power(). >This function expects that every numa domain is a superset of physical, >so when it is not, some (all) cpus in a domain might not get accounted >for, which causes division by zero problems on boot. >(Weird topology example: one cpu with two cores and two numa domains.) > >Commit 08d7ef55afc468ed6cb29d892b53063dc382c9fa made weird topologies >bootable by setting a sane default value of cpu_power. >(|cpus in domain| * SCHED_POWER_SCALE) >This was done with a presumption that normal topologies will correct the >value later. False presumption. >Only the first domain does, thus cpu_powers also get imbalanced. > >To fix this, we make init_numa_sched_groups_power() aware of the new >default; by substracting SCHED_POWER_SCALE for every cpu we add from >physical domains. >This does not affect normal topologies, where we substract everything we >added, but keeps SCHED_POWER_SCALE for every cpu missed with weird >topologies. >It makes sense to set initial cpu_power in the same for-cycle, (and we >need nonzero for sd_allnodes) so we do not have to set cpu_power in >build_numa_sched_groups(). (In the end, I'm keeping it to stay safe.) > >Signed-off-by: Radim KrÄmáŠ<rkrcmar@redhat.com> >--- > kernel/sched.c | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/kernel/sched.c b/kernel/sched.c >index f8dca86..9f6397c 100644 >--- a/kernel/sched.c >+++ b/kernel/sched.c >@@ -9176,6 +9176,9 @@ static void init_numa_sched_groups_power(struct sched_group *group_head) > if (!sg) > return; > do { >+ /* Estimate the final value to avoid /0 on weird topologies. */ >+ sg->cpu_power = SCHED_LOAD_SCALE * cpumask_weight( >+ sched_group_cpus(sg)); > for_each_cpu(j, sched_group_cpus(sg)) { > struct sched_domain *sd; > >@@ -9189,6 +9192,9 @@ static void init_numa_sched_groups_power(struct sched_group *group_head) > } > > sg->cpu_power += sd->groups->cpu_power; >+ /* Discharge initial estimate of updated cpus. */ >+ sg->cpu_power -= SCHED_LOAD_SCALE * cpumask_weight( >+ sched_group_cpus(sd->groups)); > } > sg = sg->next; > } while (sg != group_head); >-- >1.8.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1065304
:
868573
|
870669
| 874403 |
890505