|
|
76daa3 |
From a819425d0eb5135ea434625cdf7b41f0f05fd805 Mon Sep 17 00:00:00 2001
|
|
|
76daa3 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
76daa3 |
Date: Wed, 31 May 2017 19:27:23 +0200
|
|
|
76daa3 |
Subject: [PATCH 06/13] monitor: Use numa_get_node_for_cpu() on "info numa"
|
|
|
76daa3 |
|
|
|
76daa3 |
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
76daa3 |
Message-id: <20170531192723.19512-1-ehabkost@redhat.com>
|
|
|
76daa3 |
Patchwork-id: 75448
|
|
|
76daa3 |
O-Subject: [RHV-7.4 qemu-kvm-rhev PATCH] monitor: Use numa_get_node_for_cpu() on "info numa"
|
|
|
76daa3 |
Bugzilla: 1274567
|
|
|
76daa3 |
RH-Acked-by: David Gibson <dgibson@redhat.com>
|
|
|
76daa3 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
76daa3 |
RH-Acked-by: Andrew Jones <drjones@redhat.com>
|
|
|
76daa3 |
|
|
|
76daa3 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1274567
|
|
|
76daa3 |
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13317591
|
|
|
76daa3 |
Equivalent upstream commits:
|
|
|
76daa3 |
* 0b8497f08c spapr: add node-id property to sPAPR core
|
|
|
76daa3 |
* bd4c1bfe3e virt-arm: add node-id property to CPU
|
|
|
76daa3 |
* 93b2a8cb0b pc: add node-id property to CPU
|
|
|
76daa3 |
|
|
|
76daa3 |
This is a downstream-only fix for the "info numa" bug that was
|
|
|
76daa3 |
accidentally fixed by the above upstream commits. I believe this
|
|
|
76daa3 |
one-line fix is safer than backporting those commits, and it can be
|
|
|
76daa3 |
easily reverted if we decide to backport them one day.
|
|
|
76daa3 |
|
|
|
76daa3 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
76daa3 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
76daa3 |
---
|
|
|
76daa3 |
monitor.c | 10 +++++++++-
|
|
|
76daa3 |
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
76daa3 |
|
|
|
76daa3 |
diff --git a/monitor.c b/monitor.c
|
|
|
76daa3 |
index d4fbc07..d23f2eb 100644
|
|
|
76daa3 |
--- a/monitor.c
|
|
|
76daa3 |
+++ b/monitor.c
|
|
|
76daa3 |
@@ -1704,7 +1704,15 @@ static void hmp_info_numa(Monitor *mon, const QDict *qdict)
|
|
|
76daa3 |
for (i = 0; i < nb_numa_nodes; i++) {
|
|
|
76daa3 |
monitor_printf(mon, "node %d cpus:", i);
|
|
|
76daa3 |
CPU_FOREACH(cpu) {
|
|
|
76daa3 |
- if (cpu->numa_node == i) {
|
|
|
76daa3 |
+ /*
|
|
|
76daa3 |
+ * Here, numa_get_node_for_cpu(cpu->cpu_index)
|
|
|
76daa3 |
+ * can be replaced by cpu->numa_node, if we backport
|
|
|
76daa3 |
+ * the following upstream commits:
|
|
|
76daa3 |
+ * - 0b8497f08c spapr: add node-id property to sPAPR core
|
|
|
76daa3 |
+ * - bd4c1bfe3e virt-arm: add node-id property to CPU
|
|
|
76daa3 |
+ * - 93b2a8cb0b pc: add node-id property to CPU
|
|
|
76daa3 |
+ */
|
|
|
76daa3 |
+ if (numa_get_node_for_cpu(cpu->cpu_index) == i) {
|
|
|
76daa3 |
monitor_printf(mon, " %d", cpu->cpu_index);
|
|
|
76daa3 |
}
|
|
|
76daa3 |
}
|
|
|
76daa3 |
--
|
|
|
76daa3 |
1.8.3.1
|
|
|
76daa3 |
|