From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmrF4-000528-T6 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 18:43:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmrF0-0003gF-TG for qemu-devel@nongnu.org; Thu, 15 Oct 2015 18:43:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmrF0-0003gB-N6 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 18:43:18 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 41A0F8EA37 for ; Thu, 15 Oct 2015 22:43:18 +0000 (UTC) References: <1444921716-9511-1-git-send-email-armbru@redhat.com> <1444921716-9511-3-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <56202C01.2020704@redhat.com> Date: Thu, 15 Oct 2015 16:43:13 -0600 MIME-Version: 1.0 In-Reply-To: <1444921716-9511-3-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7hlU6JVbj7FDehGknC5GBn9E7heleGNbv" Subject: Re: [Qemu-devel] [PATCH 2/7] monitor: Simplify event throttling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: amit.shah@redhat.com, marcandre.lureau@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7hlU6JVbj7FDehGknC5GBn9E7heleGNbv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/15/2015 09:08 AM, Markus Armbruster wrote: > The event throttling state machine is hard to understand. I'm not > sure it's entirely correct. Rewrite it in a more straightforward > manner: >=20 > State 1: No event sent recently (less than evconf->rate ns ago) >=20 > Invariant: evstate->timer is not pending, evstate->qdict is null >=20 > On event: send event, arm timer, goto state 2 >=20 > State 2: Event sent recently, no additional event being delayed >=20 > Invariant: evstate->timer is pending, evstate->qdict is null >=20 > On event: store it in evstate->qdict, goto state 3 >=20 > On timer: goto state 1 >=20 > State 3: Event sent recently, additional event being delayed >=20 > Invariant: evstate->timer is pending, evstate->qdict is non-null >=20 > On event: store it in evstate->qdict, goto state 3 >=20 > On timer: send evstate->qdict, clear evstate->qdict, > arm timer, goto state 2 >=20 > Signed-off-by: Markus Armbruster > --- > monitor.c | 63 +++++++++++++++++++++++++++++-----------------------= -------- > trace-events | 4 ++-- > 2 files changed, 32 insertions(+), 35 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --7hlU6JVbj7FDehGknC5GBn9E7heleGNbv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWICwBAAoJEKeha0olJ0NqDkQIAJkXk/a6mvDdnqZYQkoMAQnp qns+r/j4e84SP9b3hlV749+f6Rld0idFIemFioDSgu6CTK8dyO19qqqUCElRRS5O eQyUf1p3UCkrsPuI5PWr0oM2MRPyPejFwL8cDXYXgldWArFRvL+OsgNBLfqx1zlF lRoJpV1rjZcdOEEPguAC9iD62GipAvJy3gqjMYJMFOaR5nCtylf1DYX+9tNTkQpC vAIUixJ79hw8VRDgJIe3D/+koUPyB24Y+aPcrDuyy1mvJSd5ILvXpoTR0neY/1Be pV/RQ2SUscBMetRxDcvaFPVGYNoY1YLa+iq33cHrHdA7GGgr58Bi7zZdwKtAi78= =Zxaq -----END PGP SIGNATURE----- --7hlU6JVbj7FDehGknC5GBn9E7heleGNbv--