From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPYNy-0007vD-5g for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:14:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPYNr-0004OH-BF for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:14:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8178) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPYNr-0004Nx-3O for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:14:47 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r39DEjw6022447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Apr 2013 09:14:46 -0400 Message-ID: <5164148B.4020000@redhat.com> Date: Tue, 09 Apr 2013 15:15:55 +0200 From: Peter Krempa MIME-Version: 1.0 References: <111bea6806c8d7e0f20856e75edba74f86a6bc9b.1365430186.git.minovotn@redhat.com> <5162FAF8.7010304@redhat.com> <20130409090613.70dd97e3@redhat.com> In-Reply-To: <20130409090613.70dd97e3@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] New cpu-max field in query-machines QMP command output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Michal Novotny , qemu-devel@nongnu.org On 04/09/13 15:06, Luiz Capitulino wrote: > On Mon, 08 Apr 2013 11:14:32 -0600 > Eric Blake wrote: > >> On 04/08/2013 10:41 AM, Michal Novotny wrote: >>> Alter the query-machines QMP command to output information about >>> maximum number of CPUs for each machine type with default value >>> set to 1 in case the number of max_cpus is not set. >>> >>> Signed-off-by: Michal Novotny >>> --- >>> qapi-schema.json | 4 +++- >>> vl.c | 1 + >>> 2 files changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/qapi-schema.json b/qapi-schema.json >>> index db542f6..689ca8d 100644 >>> --- a/qapi-schema.json >>> +++ b/qapi-schema.json >>> @@ -2861,11 +2861,13 @@ >>> # >>> # @default: #optional whether the machine is default >>> # >>> +# @cpu-max: maximum number of CPUs supported by the machine type >> >> Typically, when adding a field in a later version than the original >> introduction of the datatype, we add '(since 1.5)' to make it obvious >> when to expect the field. However, as nothing (currently) enforces this >> rule, I think such an addition is minor enough that it wouldn't >> invalidate the use of my: > > Oh, it turns out I was making some confusion with this patch and > didn't realize it was extending the query-machines command. > > I don't mean there's anything wrong with it, but my question is: doesn't > this patch invalidates query-cpu-max? Unfortunately, for libvirt query-cpu-max isn't really usable as it needs us to start qemu with the correct machine type. This would increase overhead as we would need to start the qemu process with a safe number of cpus, use query-cpu-max and then restart the process. The information added in the query-machines output can on the other hand be cached (we are already doing this for the machine types) and used later from the cache without increasing overhead. So yes, I think it invalidates query-cpu-max and it can be removed in case it wasn't released. Peter > > PS: I can add the '(since 1.5)' line myself. > >> >> Reviewed-by: Eric Blake >> > >