Hi Jesse, Thanks for your quick reply :)
On 26 August 2013 22:16, Jesse Gross <je...@nicira.com> wrote: > Please look at the implementation of the loop counter. Sorry but I couldn't find anything interesting/tricky in implementation of loop counter.. :( struct loop_counter { u8 count; /* Count. */ bool looping; /* Loop detected? */ }; It used to be tricky the last time you tried to add RT support (there were two separate counters for process/interrupt context), but its pretty much straight forward now.. > The current > method will yield non-deterministic results in the presence of > preemption. I see one problem: We may access these per-cpu variables concurrently from process context and bh.. And so we need something to guarantee the serialization here.. And then probably we don't need to do: get_cpu_var() for non-RT case.. Do we have some existing lock that can be reused here? Otherwise I will create a new one.. spinlock would be better then a mutex as we would be accessing this code from BH too.. > Have you also audited the other use of per-CPU variables? Yes, I did. But couldn't find anything that would be broken with RT.. Per-cpu doesn't have a problem with RT, only the access to those can be a issue.. And if things are serialized enough, then there shouldn't be any issue, I hope. And this is the only place where I saw issues with serialization of code for RT.. Thanks for your feedback/help. -- viresh _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev