From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: <kvm@vger.kernel.org>, <linux-rt-users@vger.kernel.org>,
Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH-next v2] kvm: don't try to take mmu_lock while holding the main raw kvm_lock
Date: Wed, 26 Jun 2013 22:56:54 -0400 [thread overview]
Message-ID: <20130627025654.GB3297@windriver.com> (raw)
In-Reply-To: <51CB644C.1090305@redhat.com>
[Re: [PATCH-next v2] kvm: don't try to take mmu_lock while holding the main raw kvm_lock] On 26/06/2013 (Wed 23:59) Paolo Bonzini wrote:
> Il 26/06/2013 20:11, Paul Gortmaker ha scritto:
> > spin_unlock(&kvm->mmu_lock);
> > + kvm_put_kvm(kvm);
> > srcu_read_unlock(&kvm->srcu, idx);
> >
>
> kvm_put_kvm needs to go last. I can fix when applying, but I'll wait
> for Gleb to take a look too.
I'm curious why you would say that -- since the way I sent it has the
lock tear down be symmetrical and opposite to the build up - e.g.
idx = srcu_read_lock(&kvm->srcu);
[...]
+ kvm_get_kvm(kvm);
[...]
spin_lock(&kvm->mmu_lock);
[...]
unlock:
spin_unlock(&kvm->mmu_lock);
+ kvm_put_kvm(kvm);
srcu_read_unlock(&kvm->srcu, idx);
You'd originally said to put the kvm_get_kvm where it currently is;
perhaps instead we want the get/put to encompass the whole
srcu_read locked section?
P.
--
>
> Paolo
next prev parent reply other threads:[~2013-06-27 2:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 22:34 [PATCH-next] kvm: don't try to take mmu_lock while holding the main raw kvm_lock Paul Gortmaker
2013-06-26 8:10 ` Paolo Bonzini
2013-06-26 18:11 ` [PATCH-next v2] " Paul Gortmaker
2013-06-26 21:59 ` Paolo Bonzini
2013-06-27 2:56 ` Paul Gortmaker [this message]
2013-06-27 10:22 ` Paolo Bonzini
2013-06-27 11:09 ` [PATCH-next] " Gleb Natapov
2013-06-27 11:38 ` Paolo Bonzini
2013-06-27 11:43 ` Gleb Natapov
2013-06-27 11:54 ` Paolo Bonzini
2013-06-27 12:16 ` Jan Kiszka
2013-06-27 12:32 ` Gleb Natapov
2013-06-27 13:00 ` Paolo Bonzini
2013-06-27 13:01 ` Paolo Bonzini
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=20130627025654.GB3297@windriver.com \
--to=paul.gortmaker@windriver.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-rt-users@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.