On Fri, Mar 25, 2011 at 04:39:28PM -0700, Ethan Jackson wrote:
> This commit causes updates to CFM status to be written immediately.
> A rate limit of 1 second is introduced to avoid performance
> problems.
There's a doubled space in the middle of the line
if (mon->n_fault != 1 || mon->fault[0] != cfm->fault) {
This use of timers is different from any other (that I can think of)
in the tree. It took me a minute to think through it, but it seems OK
to me.
The one thing I wonder about is: do we expect a bunch of CFM states to
change in a "clustered" way, almost at the same time? If that
happens, then we could update the first one in the database and then
have to wait a second before updating the rest in the database. Do
you think that is likely to happen? If it is, then we should consider
a different rate-limiting strategy. One way would be to use a
back-off timer, e.g. start with a 100ms interval and then increase the
update delay each time until it reaches 1s. Another way would be to
have a separate rate limit for each CFM, instead of a global rate
limit. (In the latter case it might be better to integrate the rate
limit into the CFM object itself.)
If you don't think that is a likely problem, then let's just start
with this.
Thanks,
Ben.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev