linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RCU+KVM: making CPU guest mode a quiescent state.
@ 2011-04-26 12:38 Gleb Natapov
  2011-04-26 15:55 ` Paul E. McKenney
  0 siblings, 1 reply; 7+ messages in thread
From: Gleb Natapov @ 2011-04-26 12:38 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: avi, kvm, linux-kernel

Hello Paul,

I have a question about RCU + KVM. 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). It looks like it will be beneficial to treat guest
mode as quiescent state, just like user-mode execution. How can this be
done? I was trying to find how RCU knows about cpu entering user-mode,
but it seems that it does this by checking CPU mode in a timer interrupt
(update_process_times()->rcu_check_callbacks()). This will not work for
guest mode detection since timer interrupt will kick CPU out of a guest
mode and timer interrupt will always see CPU in kernel mode. Do we have
a simple function to call to notify RCU that CPU passed quiescent state
which we can call just before entering guest?

--
			Gleb.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-27 22:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 12:38 RCU+KVM: making CPU guest mode a quiescent state Gleb Natapov
2011-04-26 15:55 ` Paul E. McKenney
2011-04-27  7:47   ` Avi Kivity
2011-04-27  7:56     ` Gleb Natapov
2011-04-27 22:30     ` Paul E. McKenney
2011-04-27 12:41   ` Gleb Natapov
2011-04-27 22:32     ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).