From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz5pd-0005so-Im for qemu-devel@nongnu.org; Tue, 16 Jul 2013 10:02:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz5pc-0007gQ-Ar for qemu-devel@nongnu.org; Tue, 16 Jul 2013 10:02:21 -0400 Sender: fluxion Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth References: In-Reply-To: Message-ID: <20130716140216.21868.62612@loki> Date: Tue, 16 Jul 2013 09:02:16 -0500 Subject: Re: [Qemu-devel] ARRAYS :QMP Declaration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Saptarshi Sen , qemu-devel@nongnu.org, qemu-discuss@nongnu.org Quoting Saptarshi Sen (2013-07-15 20:27:27) > Hi, > = > Is it possible to use fixed array data structures for use through t= he > qmp-interface. > = > My aim is to monitor IDE level activity in terms of sectors being > accessed. So > I plan to have a fixed size buffer. But I find no way of doing so w= hen > I use the > qapi-schema.json. > I think the qmp -interface uses linked lists as a replacement for a= rray > type structures. > = > Can anybody clarify my doubt and whether is it possible to use arra= ys > as in my case. Not currently, though there is a plan to support it, likely in 1.7. You can have your implementation map the buffer to a linked list type before sending a response though. It's not particularly efficient... but then again how big is this buffer gonna be? capacity/sector_size? If so I don't think that's realistic over QMP. A list of active sector numbers might actually work better. That could still be done more efficiently using arrays if we supported them currently, but in practice I don't think the extra overhead would be that much worse (though I'm assuming here that the number of secto= rs being concurrently accessed would be relatively small) > = > Regards > Saptarshi Sen