On Fri, Aug 22, 2014 at 01:58:18PM -0700, Jarno Rajahalme wrote: > Avoiding the atomic read may help if a function using > ovsthread_once_start() is ever called in a loop, as the new > 'maybe_not_done' can be kept in a register. The atomic read will > still be done as long as 'maybe_not_done' is true. Since > 'maybe_not_done' is not an atomic variable, whis may happen > indefinitely, but if a loop starts with 'maybe_not_done' as false, no > atomic read operations are needed. > > Signed-off-by: Jarno Rajahalme <[email protected]>
It seems reasonable to have a cheaper test like this, but I don't think that if we do that we need to also inline the more expensive test. In other words, I think we could drop the call to ovsthread_once_is_done__() from ovsthread_once_start(). (After that we can move ovsthread_once_is_done__() into ovs-thread.c.) _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
