public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: document lock orders
Date: Thu, 13 Oct 2016 14:51:04 +0200	[thread overview]
Message-ID: <20161013125103.GF16406@potion> (raw)
In-Reply-To: <1476357057-17899-1-git-send-email-pbonzini@redhat.com>

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
> 

      reply	other threads:[~2016-10-13 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 11:10 [PATCH] KVM: document lock orders Paolo Bonzini
2016-10-13 12:51 ` Radim Krčmář [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161013125103.GF16406@potion \
    --to=rkrcmar@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox