On Fri, Jun 13, 2014 at 11:08:37AM -0700, Gurucharan Shetty wrote: > On Thu, Jun 12, 2014 at 3:35 PM, Ben Pfaff <b...@nicira.com> wrote: > > On Fri, Jun 06, 2014 at 10:04:31AM -0700, Gurucharan Shetty wrote: > >> The new command is of the form 'time/warp LARGE_MSECS MSECS'. > >> It advances the current monotonic time by LARGE_MSECS. This is done MSECS > >> at a time in each run of the main thread. This gives other threads > >> time to run after the clock has been advanced by MSECS. > >> > >> The old command would continue to work. > >> > >> Rationale: On Windows, process creation is slower. When we have tests > >> that run 'ovs-appctl time/warp MSECS' hundreds of times in a for loop, > >> the time it takes to complete the test increases. This is specially > >> true for bfd tests. For e.g, the 11 bfd tests would take 3.5 minutes > >> to complete before this change and now takes a little less than 2 minutes. > >> > >> Signed-off-by: Gurucharan Shetty <gshe...@nicira.com> > > > > In struct large_warp, it seems a little awkward to store 'warp' as a > > timespec. I am surprised that it is not just an integer number of > > milliseconds. > > > I dilly-dallied a bit on it and was expecting an opinion. I will add > the following addition > and send a V2.
I like this better. I think that this: > + if (c->large_warp.total_warp - c->large_warp.warp >= 0) { could be written as > + if (c->large_warp.total_warp >= c->large_warp.warp) { _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev