On Thu, Mar 14, 2013 at 04:08:42PM +0100, Paolo Bonzini wrote: > Il 14/03/2013 16:03, Jan Kiszka ha scritto: > >> > vcpu->srcu_idx = srcu_read_lock() > >> > idx = srcu_read_lock(&vcpu->kvm->srcu); > >> > srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); > >> > vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); > >> > srcu_read_unlock(&vcpu->kvm->srcu, idx); > >> > srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); > >> > > >> > Not sure this is valid. > > Grmbl, likely not. > > It might be. > > Isn't it the same as two different CPUs doing > > CPU 1 CPU 2 > ------------------------------------------------------------------------------------------------ > > vcpu->srcu_idx = srcu_read_lock() > idx = srcu_read_lock(&vcpu->kvm->srcu); > srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); > vcpu->srcu_idx = srcu_read_lock(&vcpu->kvm->srcu); > srcu_read_unlock(&vcpu->kvm->srcu, idx); > srcu_read_unlock(&vcpu->kvm->srcu, vcpu->srcu_idx); > > ? > Srcu may have per cpu state. We can always ask Paul. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html