On 04/09/2015 10:50, Paolo Bonzini wrote: > Having now reviewed the patch, I think we can do better. > > The idea is: > > - only the CPU thread can set cpu->tb_jmp_cache[] > > - other threads can, under seqlock protection, _clear_ cpu->tb_jmp_cache[] > > - the seqlock can be protected by tb_lock. Then you need not retry the > read, you can just fall back to the slow path, which will take the > tb_lock and thus serialize with the clearer.
... and then we're back to the idea of making tb_invalidated_flag per-TB. :) Paolo