Re: [PATCH 4/4] KVM: x86: remove notifiers from PIT discard policy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-02-03 17:51+0100, Paolo Bonzini:
> On 03/02/2016 17:23, Radim Krčmář wrote:
>> Discard policy doesn't rely on information from notifiers, so we don't
>> need to register notifiers unconditionally.
>> 
>> Use of ps->lock doesn't make sense, but isn't any worse than before.

Oops, it is worse than before ... toggling KVM_REINJECT_CONTROL when the
guest is running and reading reinject without locking is now far more
complex.  This patch should have also ignored KVM_REINJECT_CONTROL when
PIT has been started.

> Oh, it's perfectly okay.  Too fine-grained locks are bad, and lock
> contention on ps->lock is a non-issue.
> 
> Can you however add a patch that says what fields of kvm_kpit_state are
> protected by which locks?

Ok.  (I'll be careful to not rewrite the whole PIT while at it. :])

>                            Then this patch will just add
> 
> 	/* Protected by kvm_kpit_state lock.  */
> 
> above the reinject field.

There was no need to lock reinject in the past and v2 will hopefully
achieve it again.

> Otherwise
> 
> Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Thanks.  (Might not be applicable to v2, though; sorry.)
--
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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux