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: > > State 1: No event sent recently (less than evconf->rate ns ago) > > Invariant: evstate->timer is not pending, evstate->qdict is null > > On event: send event, arm timer, goto state 2 > > State 2: Event sent recently, no additional event being delayed > > Invariant: evstate->timer is pending, evstate->qdict is null > > On event: store it in evstate->qdict, goto state 3 > > On timer: goto state 1 > > State 3: Event sent recently, additional event being delayed > > Invariant: evstate->timer is pending, evstate->qdict is non-null > > On event: store it in evstate->qdict, goto state 3 > > On timer: send evstate->qdict, clear evstate->qdict, > arm timer, goto state 2 > > Signed-off-by: Markus Armbruster <[email protected]> > --- > monitor.c | 63 > +++++++++++++++++++++++++++++------------------------------- > trace-events | 4 ++-- > 2 files changed, 32 insertions(+), 35 deletions(-) >
Reviewed-by: Eric Blake <[email protected]> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
