qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-s390x] [PATCHv5 5/5] hmp: change hmp_info_cpus to use query-cp


From: Eric Blake
Subject: Re: [qemu-s390x] [PATCHv5 5/5] hmp: change hmp_info_cpus to use query-cpus-fast
Date: Mon, 19 Feb 2018 10:57:39 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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
     query-cpus.

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 <address@hidden>
---
  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 <address@hidden>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]