Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651372 > unrolled thread
| Started by | Michael Bringmann <mwb@linux.vnet.ibm.com> |
|---|---|
| First post | 2017-05-26 15:00 +0200 |
| Last post | 2017-06-04 05:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH V3 1/2] powerpc/numa: Update CPU topology when VPHN enabled Michael Bringmann <mwb@linux.vnet.ibm.com> - 2017-05-26 15:00 +0200
Re: [PATCH V3 1/2] powerpc/numa: Update CPU topology when VPHN enabled kbuild test robot <lkp@intel.com> - 2017-06-04 05:20 +0200
| From | Michael Bringmann <mwb@linux.vnet.ibm.com> |
|---|---|
| Date | 2017-05-26 15:00 +0200 |
| Subject | [PATCH V3 1/2] powerpc/numa: Update CPU topology when VPHN enabled |
| Message-ID | <tLn0u-60Y-15@gated-at.bofh.it> |
powerpc/numa: Correct the currently broken capability to set the
topology for shared CPUs in LPARs. At boot time for shared CPU
lpars, the topology for each shared CPU is set to node zero, however,
this is now updated correctly using the Virtual Processor Home Node
(VPHN) capabilities information provided by the pHyp. The VPHN handling
in Linux is disabled, if PRRN handling is present.
Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
---
Changes in V3:
-- Remove change unrelated to this patch
---
arch/powerpc/mm/numa.c | 19 ++++++++++++++++++-
arch/powerpc/platforms/pseries/dlpar.c | 2 ++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 371792e..15c2dd5 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -29,6 +29,7 @@
#include <linux/seq_file.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
+#include <linux/sched.h>
#include <asm/cputhreads.h>
#include <asm/sparsemem.h>
#include <asm/prom.h>
@@ -42,6 +43,8 @@
#include <asm/vdso.h>
static int numa_enabled = 1;
+static int topology_inited;
+static int topology_update_needed;
static char *cmdline __initdata;
@@ -1321,8 +1324,11 @@ int arch_update_cpu_topology(void)
struct device *dev;
int weight, new_nid, i = 0;
- if (!prrn_enabled && !vphn_enabled)
+ if (!prrn_enabled && !vphn_enabled) {
+ if (!topology_inited)
+ topology_update_needed = 1;
return 0;
+ }
weight = cpumask_weight(&cpu_associativity_changes_mask);
if (!weight)
@@ -1361,6 +1367,8 @@ int arch_update_cpu_topology(void)
cpumask_andnot(&cpu_associativity_changes_mask,
&cpu_associativity_changes_mask,
cpu_sibling_mask(cpu));
+ pr_info("Assoc chg gives same node %d for cpu%d\n",
+ new_nid, cpu);
cpu = cpu_last_thread_sibling(cpu);
continue;
}
@@ -1377,6 +1385,9 @@ int arch_update_cpu_topology(void)
cpu = cpu_last_thread_sibling(cpu);
}
+ if (i)
+ updates[i-1].next = NULL;
+
pr_debug("Topology update for the following CPUs:\n");
if (cpumask_weight(&updated_cpus)) {
for (ud = &updates[0]; ud; ud = ud->next) {
@@ -1423,6 +1434,7 @@ int arch_update_cpu_topology(void)
out:
kfree(updates);
+ topology_update_needed = 0;
return changed;
}
@@ -1600,6 +1612,11 @@ static int topology_update_init(void)
if (!proc_create("powerpc/topology_updates", 0644, NULL, &topology_ops))
return -ENOMEM;
+ topology_inited = 1;
+ if (topology_update_needed)
+ bitmap_fill(cpumask_bits(&cpu_associativity_changes_mask),
+ nr_cpumask_bits);
+
return 0;
}
device_initcall(topology_update_init);
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index bda18d8..5106263 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -592,6 +592,8 @@ static ssize_t dlpar_show(struct class *class, struct class_attribute *attr,
static int __init pseries_dlpar_init(void)
{
+ arch_update_cpu_topology();
+
pseries_hp_wq = alloc_workqueue("pseries hotplug workqueue",
WQ_UNBOUND, 1);
return sysfs_create_file(kernel_kobj, &class_attr_dlpar.attr);
[toc] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-06-04 05:20 +0200 |
| Subject | Re: [PATCH V3 1/2] powerpc/numa: Update CPU topology when VPHN enabled |
| Message-ID | <tOuf8-7nn-5@gated-at.bofh.it> |
| In reply to | #1651372 |
[Multipart message — attachments visible in raw view] — view raw
Hi Michael,
[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.12-rc3 next-20170602]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Michael-Bringmann/powerpc-numa-Update-CPU-topology-when-VPHN-enabled/20170527-052650
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-cell_defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All errors (new ones prefixed by >>):
>> arch/powerpc/mm/numa.c:47:12: error: 'topology_update_needed' defined but not used [-Werror=unused-variable]
static int topology_update_needed;
^~~~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/mm/numa.c:46:12: error: 'topology_inited' defined but not used [-Werror=unused-variable]
static int topology_inited;
^~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/topology_update_needed +47 arch/powerpc/mm/numa.c
40 #include <asm/paca.h>
41 #include <asm/hvcall.h>
42 #include <asm/setup.h>
43 #include <asm/vdso.h>
44
45 static int numa_enabled = 1;
> 46 static int topology_inited;
> 47 static int topology_update_needed;
48
49 static char *cmdline __initdata;
50
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web