Same comment as the previous patch, otherwise looks good, thanks. Ethan
On Fri, Apr 20, 2012 at 14:10, Ben Pfaff <b...@nicira.com> wrote: > I'd always assumed that the EWMA code in timeval was enough rate-limiting, > but I actually encountered a pathological case some time ago that forced > this coverage information to print once a second or so, which seems too > often. > > Signed-off-by: Ben Pfaff <b...@nicira.com> > --- > lib/coverage.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/lib/coverage.c b/lib/coverage.c > index 0deb526..ff20f5e 100644 > --- a/lib/coverage.c > +++ b/lib/coverage.c > @@ -158,11 +158,14 @@ coverage_log_counter(enum vlog_level level, const > struct coverage_counter *c) > void > coverage_log(enum vlog_level level, bool suppress_dups) > { > + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 3); > size_t n_never_hit; > uint32_t hash; > size_t i; > > - if (!vlog_is_enabled(THIS_MODULE, level)) { > + if (suppress_dups > + ? !vlog_is_enabled(THIS_MODULE, level) > + : vlog_should_drop(THIS_MODULE, level, &rl)) { > return; > } > > -- > 1.7.2.5 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev