From: "Marc-André Lureau" <mlureau@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: marcandre lureau <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC 1/3] monitor: split MonitorQAPIEventState
Date: Wed, 12 Aug 2015 16:36:16 -0400 (EDT) [thread overview]
Message-ID: <761108243.8538357.1439411776597.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <55CBA5C1.1010401@redhat.com>
Hi
----- Original Message -----
> On 08/12/15 21:46, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Create a seperate pending event structure MonitorQAPIEventPending.
> > Use a MonitorQAPIEventDelay callback to handle the delaying. This
> > allows other implementations of throttling.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> > monitor.c | 124
> > +++++++++++++++++++++++++++++++++++++----------------------
> > trace-events | 2 +-
> > 2 files changed, 79 insertions(+), 47 deletions(-)
>
> Assume there has been a long period of silence (no attempts to emit an
> event). Now some client code makes a call to emit the event.
>
> Will that event be emitted immediately, or will it be delayed to see if
> more are coming? I'd like to understand this aspect first.
>
> I think the first instance of the event, after the grace period, should
> be emitted immediately, and further instances that quickly follow should
> be suppressed.
This is what qemu already does. The first event is sent immediately, the
later ones may be delayed (but there will be at least one event every period,
if the event is flooded). This patch 1/3 doesn't change the logic, only
it split things to make them a bit more modular.
So the rest of the patches do not change the qemu delay logic, it adds a way to
delay based on (event + "id") instead of just (event). It does that by
adding an additional "id" hashtable for the event type. My hope is
that this apporach could be reused if other field or combinations of fields
are necessary for other events, but for now, it's hardcoded for "id".
cheers
next prev parent reply other threads:[~2015-08-12 20:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 19:46 [Qemu-devel] [RFC 0/3] monitor: throttle VSERPORT_CHANGED by "id" marcandre.lureau
2015-08-12 19:46 ` [Qemu-devel] [RFC 1/3] monitor: split MonitorQAPIEventState marcandre.lureau
2015-08-12 20:00 ` Laszlo Ersek
2015-08-12 20:36 ` Marc-André Lureau [this message]
2015-08-12 21:25 ` Eric Blake
2015-09-01 20:19 ` Eric Blake
2015-08-12 19:46 ` [Qemu-devel] [RFC 2/3] monitor: throttle QAPI_EVENT_VSERPORT_CHANGE by "id" marcandre.lureau
2015-09-01 20:24 ` Eric Blake
2015-08-12 19:46 ` [Qemu-devel] [RFC 3/3] monitor: remove old entries from event hash table marcandre.lureau
2015-09-01 20:28 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=761108243.8538357.1439411776597.JavaMail.zimbra@redhat.com \
--to=mlureau@redhat.com \
--cc=lersek@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).