From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPYp1-0002od-Sq for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:42:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPYox-0006Am-5a for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:42:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21434) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPYow-0006Aa-Tw for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:42:47 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r39Dgkp6015401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Apr 2013 09:42:46 -0400 Date: Tue, 9 Apr 2013 09:42:45 -0400 From: Luiz Capitulino Message-ID: <20130409094245.47ac1ab6@redhat.com> In-Reply-To: <51641889.6010905@redhat.com> References: <111bea6806c8d7e0f20856e75edba74f86a6bc9b.1365430186.git.minovotn@redhat.com> <5162FAF8.7010304@redhat.com> <20130409090613.70dd97e3@redhat.com> <51641301.5000302@redhat.com> <20130409091551.6937c656@redhat.com> <51641889.6010905@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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: Michal Novotny Cc: qemu-devel@nongnu.org On Tue, 09 Apr 2013 15:32:57 +0200 Michal Novotny wrote: > > On 04/09/2013 03:15 PM, Luiz Capitulino wrote: > > On Tue, 09 Apr 2013 15:09:21 +0200 > > Michal Novotny wrote: > > > >> On 04/09/2013 03:06 PM, 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? > >> Not really, the query-cpu-max shows maximum number of CPUs supported per > >> currently running machine (machine type) however the extension to > >> query-machines shows the maximum number of CPUs supported per each of > >> the displayed machine types. This usually doesn't matter on x86 > >> architectures however it does matter on ARM, for example, as ARM has > >> some CPU models supporting up to 4 CPUs (highbank model) whereas most of > >> the ARM processors does have only one CPU. > > Can't we eliminate the query-cpu-max command if we extend the > > query-machines command to show which machine type is in use? > > It may be useful as query-cpu-max is showing maximum number of CPUs > supported per machine type QEMU currently emulates. We don't have to > know the machine type and look for this number manually in the > query-machines output if we have query-cpu-max. QMP is a machine protocol, "manual" in that context is not a problem. It's actually wanted. > We would have to both > know the machine type and look for the number manually to get max-cpu > count for currently running machine if we get rid of query-cpu-max command. > > Whether something will use the value of CPU-max for currently running > machine (query-cpu-max output) is another question. What you mean by that? Why are we adding a command if we don't even know if it's going to be used? If I remember correctly, it was said that libivrt was asking for this command. If this is not the case let's drop it, because the command is bad (ie. this should be done through QOM). I've applied this patch, but again, if query-cpu-max is not required by any QMP user, please post patches reverting it.