diff options
author | Vadim Galitsyn <vadim.galitsyn@profitbricks.com> | 2017-08-29 17:30:20 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-09-14 15:52:10 +0100 |
commit | 31959e82fb0537e09f6c53b78323c510d794a73c (patch) | |
tree | 1221972ce63a0ab179979baa82179674dec5afa3 /monitor.c | |
parent | 4e5c3a3742adcf7514b73f4da1c005ee7b35e41b (diff) |
hmp: extend "info numa" with hotplugged memory information
Report amount of hotplugged memory in addition to total
amount per NUMA node.
Signed-off-by: Vadim Galitsyn <vadim.galitsyn@profitbricks.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org
Message-Id: <20170829153022.27004-2-vadim.galitsyn@profitbricks.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1710,11 +1710,12 @@ static void hmp_info_mtree(Monitor *mon, const QDict *qdict) static void hmp_info_numa(Monitor *mon, const QDict *qdict) { int i; - uint64_t *node_mem; + NumaNodeMem *node_mem; CpuInfoList *cpu_list, *cpu; cpu_list = qmp_query_cpus(&error_abort); - node_mem = g_new0(uint64_t, nb_numa_nodes); + node_mem = g_new0(NumaNodeMem, nb_numa_nodes); + query_numa_node_mem(node_mem); monitor_printf(mon, "%d nodes\n", nb_numa_nodes); for (i = 0; i < nb_numa_nodes; i++) { @@ -1727,7 +1728,9 @@ static void hmp_info_numa(Monitor *mon, const QDict *qdict) } monitor_printf(mon, "\n"); monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i, - node_mem[i] >> 20); + node_mem[i].node_mem >> 20); + monitor_printf(mon, "node %d plugged: %" PRId64 " MB\n", i, + node_mem[i].node_plugged_mem >> 20); } qapi_free_CpuInfoList(cpu_list); g_free(node_mem); |