Received: from eggs.gnu.org ([2001:4830:134:3::10]:57715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgTsG-00042Z-Jj for qemu-devel@nongnu.org; Mon, 28 Sep 2015 04:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgTsD-0001p1-Dh for qemu-devel@nongnu.org; Mon, 28 Sep 2015 04:33:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgTsD-0001o7-8W for qemu-devel@nongnu.org; Mon, 28 Sep 2015 04:33:25 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 04A299159D for ; Mon, 28 Sep 2015 08:33:25 +0000 (UTC) From: Markus Armbruster References: <1443189647-11417-1-git-send-email-armbru@redhat.com> <1443189647-11417-6-git-send-email-armbru@redhat.com> <56059F5C.4000400@redhat.com> Date: Mon, 28 Sep 2015 10:33:22 +0200 In-Reply-To: <56059F5C.4000400@redhat.com> (Eric Blake's message of "Fri, 25 Sep 2015 13:24:12 -0600") Message-ID: <87zj07kkod.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC 5/6] monitor: Throttle event VSERPORT_CHANGE separately by "id" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: amit.shah@redhat.com, marcandre.lureau@redhat.com, lersek@redhat.com, qemu-devel@nongnu.org Eric Blake writes: > On 09/25/2015 08:00 AM, Markus Armbruster wrote: >> VSERPORT_CHANGE is emitted when the guest opens or closes a >> virtio-serial port. The event's member "id" identifies the port. >> >> When several events arrive quickly, throttling drops all but the last >> of them. Because of that, a QMP client must assume that *any* port >> may have changed state when it receives a VSERPORT_CHANGE event and >> throttling may have happened. >> >> Make the event more useful by throttling it for each port separately. >> >> Signed-off-by: Markus Armbruster >> --- >> monitor.c | 18 ++++++++++++++++-- >> 1 file changed, 16 insertions(+), 2 deletions(-) >> > > All future differentiation would be added as additional special cases > within the hash functions, but I like this approach for keeping the rest > of the algorithm independent from what the hashing considers as equivalent. Should that ever become unwieldy, we can easily add indirections right there. > Reviewed-by: Eric Blake Thanks!