From: Gleb Natapov <gleb@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: paulmck@linux.vnet.ibm.com, avi@redhat.com, mtosatti@redhat.com,
kvm@vger.kernel.org
Subject: [PATCH 2/2] KVM: make guest mode entry to be rcu quiescent state
Date: Thu, 28 Apr 2011 12:52:03 +0300 [thread overview]
Message-ID: <1303984323-3203-3-git-send-email-gleb@redhat.com> (raw)
In-Reply-To: <1303984323-3203-1-git-send-email-gleb@redhat.com>
KVM does not hold any references to rcu protected data when it switches
CPU into a guest mode. In fact switching to a guest mode is very similar
to exiting to userspase from rcu point of view. In addition CPU may stay
in a guest mode for quite a long time (up to one time slice). Lets treat
guest mode as quiescent state, just like we do with user-mode execution.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
include/linux/kvm_host.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 0bc3d37..a347bce 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -593,6 +593,7 @@ static inline void kvm_guest_enter(void)
{
account_system_vtime(current);
current->flags |= PF_VCPU;
+ rcu_note_context_switch(smp_processor_id());
}
static inline void kvm_guest_exit(void)
--
1.7.2.3
next prev parent reply other threads:[~2011-04-28 9:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 9:52 [PATCH 0/2] make kvm guest mode " Gleb Natapov
2011-04-28 9:52 ` [PATCH 1/2] rcu: export rcu_note_context_switch() function Gleb Natapov
2011-04-28 10:01 ` Avi Kivity
2011-04-28 10:11 ` Gleb Natapov
2011-04-29 8:36 ` Paul E. McKenney
2011-04-29 8:39 ` Paul E. McKenney
2011-04-29 18:02 ` Gleb Natapov
2011-04-29 18:23 ` Gleb Natapov
2011-04-30 12:59 ` Paul E. McKenney
2011-04-30 19:43 ` Avi Kivity
2011-05-02 10:56 ` Gleb Natapov
2011-05-02 13:36 ` Paul E. McKenney
2011-05-02 14:10 ` Gleb Natapov
2011-05-03 6:25 ` Paul E. McKenney
2011-05-04 13:10 ` Gleb Natapov
2011-04-28 9:52 ` Gleb Natapov [this message]
2011-05-03 13:13 ` [PATCH 2/2] KVM: make guest mode entry to be rcu quiescent state Marcelo Tosatti
2011-05-03 13:20 ` Avi Kivity
2011-05-03 13:21 ` Gleb Natapov
2011-05-03 13:29 ` Marcelo Tosatti
2011-05-03 13:39 ` Gleb Natapov
2011-05-03 15:42 ` Marcelo Tosatti
2011-05-04 13:31 [PATCH 0/2] make kvm guest mode " Gleb Natapov
2011-05-04 13:31 ` [PATCH 2/2] KVM: make guest mode entry " Gleb Natapov
2011-05-11 9:57 ` Avi Kivity
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=1303984323-3203-3-git-send-email-gleb@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=paulmck@linux.vnet.ibm.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
all inboxes | Powered by JetHome®