On 02/16/2018 10:08 AM, Viktor Mihajlovski wrote:
Changing the implementation of hmp_info_cpus() to call
qmp_query_cpus_fast() instead of qmp_query_cpus. This has the
following consequences:

   o No further code change required for qmp_query_cpus deprecation

   o HMP profits from the less disruptive cpu information retrieval

   o HMP 'info cpus' won't display architecture specific data anymore,
     which should be tolerable in the light of the deprecation of

In order to allow 'info cpus' to be executed completely on the
fast path, monitor_get_cpu_index() has been adapted to not synchronize
the cpu state.

Signed-off-by: Viktor Mihajlovski <mihaj...@linux.vnet.ibm.com>
  hmp.c     | 41 +++++++----------------------------------
  monitor.c | 13 ++++++++++---
  2 files changed, 17 insertions(+), 37 deletions(-)

diff --git a/hmp.c b/hmp.c
index 7870d6a..ae86bfb 100644
--- a/hmp.c
+++ b/hmp.c
@@ -360,50 +360,23 @@ void hmp_info_migrate_cache_size(Monitor *mon, const 
QDict *qdict)
void hmp_info_cpus(Monitor *mon, const QDict *qdict)
-    CpuInfoList *cpu_list, *cpu;
+    CpuInfoFastList *cpu_list, *cpu;
- cpu_list = qmp_query_cpus(NULL);
+    cpu_list = qmp_query_cpus_fast(NULL);

Pre-existing, but a bit unusual to call this with errors completely ignored. Can be a followup patch, if desired.

Reviewed-by: Eric Blake <ebl...@redhat.com>

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to