[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150205192704.GM5370@linux.vnet.ibm.com>
Date: Thu, 5 Feb 2015 11:27:04 -0800
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Rik van Riel <riel@...hat.com>
Cc: Christian Borntraeger <borntraeger@...ibm.com>,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
mtosatti@...hat.com, mingo@...nel.org, ak@...ux.intel.com,
oleg@...hat.com, masami.hiramatsu.pt@...achi.com,
fweisbec@...il.com, lcapitulino@...hat.com, pbonzini@...hat.com
Subject: Re: [PATCH 4/4] kvm,rcu: use RCU extended quiescent state when
running KVM guest
On Thu, Feb 05, 2015 at 02:02:35PM -0500, Rik van Riel wrote:
> On 02/05/2015 01:56 PM, Paul E. McKenney wrote:
>
> > The real danger is doing neither.
> >
> > On tick_nohz_full_cpu() CPUs, the exit-to-userspace code should invoke
> > rcu_user_enter(), which sets some per-CPU state telling RCU to ignore
> > that CPU, since it cannot possibly do host RCU read-side critical sections
> > while running a guest.
> >
> > In contrast, a non-tick_nohz_full_cpu() CPU doesn't let RCU
> > know that it is executing in a guest or in userspace. So the
> > rcu_virt_note_context_switch() does the notification in that case.
>
> Looking at context_tracking.h, I see the
> function context_tracking_cpu_is_enabled().
>
> That looks like it should do the right thing
> in this case.
Right you are -- that same check is used to guard the
context_tracking_user_enter() function's call to rcu_user_enter().
Not sure why it open-codes the check rather than invoking
context_tracking_cpu_is_enabled(). Hmmm.... One reason is that
the context_tracking_cpu_is_enabled() function isn't available in
that context, according to my compiler. ;-)
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists