From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnqWQ-0006O9-PT for qemu-devel@nongnu.org; Fri, 23 May 2014 10:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnqWK-0004Ug-VH for qemu-devel@nongnu.org; Fri, 23 May 2014 10:32:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnqWK-0004UY-MC for qemu-devel@nongnu.org; Fri, 23 May 2014 10:32:28 -0400 Message-ID: <537F557D.5080005@redhat.com> Date: Fri, 23 May 2014 08:04:45 -0600 From: Eric Blake MIME-Version: 1.0 References: <1400756850-19807-1-git-send-email-laine@laine.org> <1400756850-19807-4-git-send-email-laine@laine.org> <537E50FA.1000304@redhat.com> <20140523035038.GA23327@amt.cnet> <20140523084311.495cb040@redhat.com> <87fvk0mxd4.fsf@blackfin.pond.sub.org> <20140523134818.GB1358@amt.cnet> In-Reply-To: <20140523134818.GB1358@amt.cnet> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="J2Jbha7Ha7SI5PtGEHrjkneskPgXdIvs6" Subject: Re: [Qemu-devel] [libvirt] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti , Markus Armbruster Cc: libvir-list@redhat.com, "qemu-devel@nongnu.org" , Laine Stump This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --J2Jbha7Ha7SI5PtGEHrjkneskPgXdIvs6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/23/2014 07:48 AM, Marcelo Tosatti wrote: > This also seems pretty harmful wrt losing events: >=20 > /* Global, one-time initializer to configure the rate limiting > * and initialize state */ > static void monitor_protocol_event_init(void) > { > /* Limit RTC & BALLOON events to 1 per second */ > monitor_protocol_event_throttle(QEVENT_RTC_CHANGE, 1000); >=20 > Better remove it. No, this throttling MUST be present to avoid a guest-triggered denial-of-service attack (otherwise the guest could trigger RTC change events fast enough to starve the host in dealing with them). Again, lost events are expected. What is important is that when throttling, and event is guaranteed to be sent at the end of the throttling period so that libvirt will always eventually get an event with the latest state (even if intermediate events were lost) with no more latency than the throttling period; and either the event caries the current state (and not something that needs accumulation), or the event is a witness that libvirt needs to do an additional query- command to learn the current state. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --J2Jbha7Ha7SI5PtGEHrjkneskPgXdIvs6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTf1V9AAoJEKeha0olJ0NqC2cH/jpYUaCOYp5+Q26SILMoXyRU SjB6NhoBbRnN7ic8qCrSG/IN1nOmuqAbWup0baSJpMjSoRRjB4VqDu+dIG4hZzm+ YBHuxfSdu+JEnM8zy8qg1Kv6sMIeGasVwvHDKKUl4to5XcuaiL9OdZSjrysk0Fi7 5cGlTaOD22w4+rEj+SE+x7ECxwwBOBGktRs4IVv5ZO/Sh56BJgExdDB9P5It1vOm hHOxMlIqbQnoEPCN3eY2sZ2JgYzM2frIt2afKvArE17enjZ/2j6EGyyXufPLV4b1 m6PTs56n7WmyDKQaYmj9nOlrXB0LwVcsHrtmZNJa76m61e6XBuk+s8o58JKS2T0= =l9nq -----END PGP SIGNATURE----- --J2Jbha7Ha7SI5PtGEHrjkneskPgXdIvs6--