Received: from eggs.gnu.org ([2001:4830:134:3::10]:49260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enolA-0004QJ-C0 for qemu-devel@nongnu.org; Mon, 19 Feb 2018 11:57:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enol5-0005F1-Pp for qemu-devel@nongnu.org; Mon, 19 Feb 2018 11:57:48 -0500 References: <1518797321-28356-1-git-send-email-mihajlov@linux.vnet.ibm.com> <1518797321-28356-6-git-send-email-mihajlov@linux.vnet.ibm.com> From: Eric Blake Message-ID: <45949808-40af-8f8b-0651-08cb98300043@redhat.com> Date: Mon, 19 Feb 2018 10:57:39 -0600 MIME-Version: 1.0 In-Reply-To: <1518797321-28356-6-git-send-email-mihajlov@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv5 5/5] hmp: change hmp_info_cpus to use query-cpus-fast List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Viktor Mihajlovski , qemu-devel@nongnu.org Cc: agraf@suse.de, ehabkost@redhat.com, armbru@redhat.com, cohuck@redhat.com, david@redhat.com, dgilbert@redhat.com, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, pbonzini@redhat.com, rth@twiddle.net 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 > --- > 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 -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org