From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzSbC-0004EX-K7 for qemu-devel@nongnu.org; Wed, 17 Jul 2013 10:21:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzSb8-0000Ci-1P for qemu-devel@nongnu.org; Wed, 17 Jul 2013 10:20:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzSb7-0000Cb-Gj for qemu-devel@nongnu.org; Wed, 17 Jul 2013 10:20:53 -0400 Message-ID: <51E6A826.4010003@redhat.com> Date: Wed, 17 Jul 2013 16:20:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1374053373-30499-1-git-send-email-gaowanlong@cn.fujitsu.com> <1374053373-30499-2-git-send-email-gaowanlong@cn.fujitsu.com> <51E67368.3000003@redhat.com> <51E68D0F.4040503@redhat.com> <51E6A2D9.5040202@redhat.com> In-Reply-To: <51E6A2D9.5040202@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V5 01/12] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: aliguori@us.ibm.com, ehabkost@redhat.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, bsd@redhat.com, y-goto@jp.fujitsu.com, lcapitulino@redhat.com, afaerber@suse.de, Wanlong Gao Il 17/07/2013 15:57, Laszlo Ersek ha scritto: >> > Not only that, but is this even the right representation? The fact that >> > you are requiring the receiver to further parse this string means you >> > probably represented it at the wrong level in JSON. That is, a JSON >> > string "1,2,4" requires post-processing to turn it into 3 processor ids, >> > while a JSON array [1, 2, 4] does not, so you should probably consider >> > '*cpus':['int'] as your preferred datatype. > opts-visitor can handle lists of simple scalar types. Ie. it can do > -numa node,nodeid=3,cpus=3-4,cpus=9-10. It can't save the parsing of > intervals (eg. 3-4). Saving the parsing of intervals is not necessary for this use case. So if we can make it '*cpus':['int'], we should. But is it the opts-visitor "can handle" lists of integers, or does code have to be written? If the latter, can you whip up a prototype? Paolo > This is of course not to say that the interface should be limited by > what opts-visitor can do; just that opts-visitor may not be appropriate > for (or solve completely the needs of) very intricate options.