Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1500253
| From | Radim Krčmář <rkrcmar@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] KVM: document lock orders |
| Date | 2016-10-13 15:00 +0200 |
| Message-ID | <srNMa-3Dq-13@gated-at.bofh.it> (permalink) |
| References | <srMdk-2NV-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2016-10-13 13:10+0200, Paolo Bonzini: > This is long overdue, and not really hard. > > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- Applied to kvm/queue, thanks. > Documentation/virtual/kvm/locking.txt | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/Documentation/virtual/kvm/locking.txt b/Documentation/virtual/kvm/locking.txt > index f2491a8c68b4..e5dd9f4d6100 100644 > --- a/Documentation/virtual/kvm/locking.txt > +++ b/Documentation/virtual/kvm/locking.txt > @@ -4,7 +4,17 @@ KVM Lock Overview > 1. Acquisition Orders > --------------------- > > -(to be written) > +The acquisition orders for mutexes are as follows: > + > +- kvm->lock is taken outside vcpu->mutex > + > +- kvm->lock is taken outside kvm->slots_lock and kvm->irq_lock > + > +- kvm->slots_lock is taken outside kvm->irq_lock, though acquiring > + them together is quite rare. > + > +For spinlocks, kvm_lock is taken outside kvm->mmu_lock. Everything > +else is a leaf: no other lock is taken inside the critical sections. > > 2: Exception > ------------ > -- > 2.7.4 >
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] KVM: document lock orders Paolo Bonzini <pbonzini@redhat.com> - 2016-10-13 13:20 +0200 Re: [PATCH] KVM: document lock orders Radim Krčmář <rkrcmar@redhat.com> - 2016-10-13 15:00 +0200
csiph-web