Received: from eggs.gnu.org ([2001:4830:134:3::10]:49756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Urm8g-0001FY-3s for qemu-devel@nongnu.org; Wed, 26 Jun 2013 05:35:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Urm8e-0001uS-P3 for qemu-devel@nongnu.org; Wed, 26 Jun 2013 05:35:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Urm8e-0001uF-4G for qemu-devel@nongnu.org; Wed, 26 Jun 2013 05:35:44 -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 r5Q9ZhZn026386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 Jun 2013 05:35:43 -0400 From: Markus Armbruster References: <1369300080-31377-1-git-send-email-akong@redhat.com> <1369300080-31377-3-git-send-email-akong@redhat.com> <20130523120325.3113c687@redhat.com> <20130524030813.GB1550@t430s.nay.redhat.com> <20130524082326.452cc9f0@redhat.com> <519F6350.1040502@redhat.com> <20130524090834.41dd9108@redhat.com> <519F69BF.7000005@redhat.com> Date: Wed, 26 Jun 2013 11:35:41 +0200 In-Reply-To: <519F69BF.7000005@redhat.com> (Eric Blake's message of "Fri, 24 May 2013 07:23:11 -0600") Message-ID: <87hagljjte.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Amos Kong , mst@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, Luiz Capitulino Eric Blake writes: > On 05/24/2013 07:08 AM, Luiz Capitulino wrote: >> This sounds like premature optimization to me, but I wonder if instead >> of cluttering commands with arguments to do the filtering we could add >> some standard way of doing this in the QAPI. > > Maybe we could make QAPI support generic filtering for all query-* > commands. But there's still a cost with making all query-* commands > malloc the space for an entire list only to then have a QAPI layer on > top of it do filtering before handing back the single element over the > wire, compared to passing the filtering down to the query-* > implementation to do the filtering in place. I'd expect the time spent on malloc to be dwarved several times over by I/O latency. If we worry about malloc impacting our latency, then we should not be using QAPI! It's really, really malloc-happy. In QMP, we generally don't. >> It was you who suggested a filter command? > > No, Stefan suggested it on v1: > https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03102.html So far, I'm with Luiz here.