Re: [4.2] commit d59cfc09c32 (sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem) causes regression for libvirt/kvm

2015-09-15 Thread Paul E. McKenney
On Tue, Sep 15, 2015 at 09:24:15PM -0400, Tejun Heo wrote: > Hello, Paul. > > On Tue, Sep 15, 2015 at 04:38:18PM -0700, Paul E. McKenney wrote: > > Well, the decision as to what is too big for -stable is owned by the > > -stable maintainers, not by me. > > Is it

Re: [4.2] commit d59cfc09c32 (sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem) causes regression for libvirt/kvm

2015-09-15 Thread Paul E. McKenney
On Tue, Sep 15, 2015 at 06:28:11PM -0400, Tejun Heo wrote: > Hello, > > On Tue, Sep 15, 2015 at 02:38:30PM -0700, Paul E. McKenney wrote: > > I did take a shot at adding the rcu_sync stuff during this past merge > > window, but it did not converge quickly enough to make it

Re: [4.2] commit d59cfc09c32 (sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem) causes regression for libvirt/kvm

2015-09-15 Thread Paul E. McKenney
On Tue, Sep 15, 2015 at 06:42:19PM +0200, Paolo Bonzini wrote: > > > On 15/09/2015 15:36, Christian Borntraeger wrote: > > I am wondering why the old code behaved in such fatal ways. Is there > > some interaction between waiting for a reschedule in the > > synchronize_sched writer and some fork

Re: [4.2] commit d59cfc09c32 (sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem) causes regression for libvirt/kvm

2015-09-15 Thread Paul E. McKenney
On Tue, Sep 15, 2015 at 05:26:22PM -0400, Tejun Heo wrote: > Hello, > > On Tue, Sep 15, 2015 at 11:11:45PM +0200, Christian Borntraeger wrote: > > > In fact, I would say that any userspace-controlled call to *_expedited() > > > is a bug waiting to happen and a bad idea---because userspace can,

Re: [PATCH -v5 6/5] context_tracking: fix exception_enter when already in IN_KERNEL

2015-02-11 Thread Paul E. McKenney
On Wed, Feb 11, 2015 at 02:43:19PM -0500, Rik van Riel wrote: If exception_enter happens when already in IN_KERNEL state, the code still calls context_tracking_exit, which ends up in rcu_eqs_exit_common, which explodes with a WARN_ON when it is called in a situation where dynticks are not

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 11:48:37AM -0500, Rik van Riel wrote: On 02/10/2015 10:28 AM, Frederic Weisbecker wrote: On Tue, Feb 10, 2015 at 09:41:45AM -0500, r...@redhat.com wrote: From: Rik van Riel r...@redhat.com These wrapper functions allow architecture code (eg. ARM) to keep calling

Re: [PATCH 1/6] rcu,nohz: add context_tracking_user_enter/exit wrapper functions

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 06:36:47PM +0100, Frederic Weisbecker wrote: On Tue, Feb 10, 2015 at 09:25:26AM -0800, Paul E. McKenney wrote: On Tue, Feb 10, 2015 at 11:48:37AM -0500, Rik van Riel wrote: On 02/10/2015 10:28 AM, Frederic Weisbecker wrote: On Tue, Feb 10, 2015 at 09:41:45AM -0500

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 01:00:35PM -0800, Andy Lutomirski wrote: On Tue, Feb 10, 2015 at 12:42 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Tue, Feb 10, 2015 at 12:19:28PM -0800, Andy Lutomirski wrote: On Tue, Feb 10, 2015 at 12:14 PM, Paul E. McKenney paul

Re: [PATCH 1/5] context_tracking: generalize context tracking APIs to support user and guest

2015-02-10 Thread Paul E. McKenney
transitions. Signed-off-by: Rik van Riel r...@redhat.com Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/context_tracking.h | 8 +--- kernel/context_tracking.c| 43 ++-- 2 files changed, 33 insertions(+), 18

Re: [PATCH 4/5] nohz,kvm: export context_tracking_user_enter/exit

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 03:27:53PM -0500, r...@redhat.com wrote: From: Rik van Riel r...@redhat.com Export context_tracking_user_enter/exit so it can be used by KVM. Signed-off-by: Rik van Riel r...@redhat.com Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- kernel

Re: [PATCH 3/5] rcu,nohz: run vtime_user_enter/exit only when state == IN_USER

2015-02-10 Thread Paul E. McKenney
take care of calling vtime_guest_enter and vtime_guest_exit, respectively. The RCU code only distinguishes between idle and not idle or kernel. There should be no need to add an additional (unused) state there. Signed-off-by: Rik van Riel r...@redhat.com Reviewed-by: Paul E. McKenney paul

Re: [PATCH 5/5] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
at first, but it avoids a needless unconditional call in cases where the static_key disables context tracking. (This is due to separate compilation.) So... Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/context_tracking.h | 6 ++ include/linux

Re: [PATCH 2/5] nohz: add stub context_tracking_is_enabled

2015-02-10 Thread Paul E. McKenney
CONFIG_CONTEXT_TRACKING is not set. Signed-off-by: Rik van Riel r...@redhat.com Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/context_tracking_state.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/context_tracking_state.h b/include/linux

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 12:19:28PM -0800, Andy Lutomirski wrote: On Tue, Feb 10, 2015 at 12:14 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Tue, Feb 10, 2015 at 11:59:09AM -0800, Andy Lutomirski wrote: On 02/10/2015 06:41 AM, r...@redhat.com wrote: From: Rik van Riel r

Re: [PATCH 6/6] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-10 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 11:59:09AM -0800, Andy Lutomirski wrote: On 02/10/2015 06:41 AM, r...@redhat.com wrote: From: Rik van Riel r...@redhat.com The host kernel is not doing anything while the CPU is executing a KVM guest VCPU, so it can be marked as being in an extended quiescent state,

Re: [PATCH -v3 0/6] rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

2015-02-09 Thread Paul E. McKenney
On Tue, Feb 10, 2015 at 02:44:17AM +0100, Frederic Weisbecker wrote: On Mon, Feb 09, 2015 at 08:22:59PM -0500, Rik van Riel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/09/2015 08:15 PM, Will Deacon wrote: Hi Rik, On Mon, Feb 09, 2015 at 04:04:38PM +,

Re: [PATCH -v3 0/6] rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

2015-02-09 Thread Paul E. McKenney
On Mon, Feb 09, 2015 at 10:03:08PM -0500, Rik van Riel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/09/2015 10:01 PM, Paul E. McKenney wrote: On Tue, Feb 10, 2015 at 02:44:17AM +0100, Frederic Weisbecker wrote: On Mon, Feb 09, 2015 at 08:22:59PM -0500, Rik van Riel wrote

Re: [PATCH 1/5] rcu,nohz: add state parameter to context_tracking_user_enter/exit

2015-02-07 Thread Paul E. McKenney
On Sat, Feb 07, 2015 at 09:30:41AM +0100, Frederic Weisbecker wrote: On Fri, Feb 06, 2015 at 11:14:53PM -0800, Paul E. McKenney wrote: On Fri, Feb 06, 2015 at 10:34:21PM -0800, Paul E. McKenney wrote: On Fri, Feb 06, 2015 at 10:53:34PM -0500, Rik van Riel wrote: -BEGIN PGP SIGNED

Re: [PATCH 1/5] rcu,nohz: add state parameter to context_tracking_user_enter/exit

2015-02-06 Thread Paul E. McKenney
On Fri, Feb 06, 2015 at 10:34:21PM -0800, Paul E. McKenney wrote: On Fri, Feb 06, 2015 at 10:53:34PM -0500, Rik van Riel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/06/2015 06:15 PM, Frederic Weisbecker wrote: Just a few things then: 1) In this case rename

Re: [PATCH 1/5] rcu,nohz: add state parameter to context_tracking_user_enter/exit

2015-02-06 Thread Paul E. McKenney
On Fri, Feb 06, 2015 at 10:53:34PM -0500, Rik van Riel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/06/2015 06:15 PM, Frederic Weisbecker wrote: Just a few things then: 1) In this case rename context_tracking_user_enter/exit() to context_tracking_enter() and

Re: [PATCH 1/5] rcu,nohz: add state parameter to context_tracking_user_enter/exit

2015-02-06 Thread Paul E. McKenney
On Fri, Feb 06, 2015 at 11:15:57AM +0100, Paolo Bonzini wrote: On 06/02/2015 00:55, Paul E. McKenney wrote: On Thu, Feb 05, 2015 at 03:23:48PM -0500, r...@redhat.com wrote: From: Rik van Riel r...@redhat.com Add the expected ctx_state as a parameter to context_tracking_user_enter

Re: [PATCH v2 0/5] rcu,nohz,kvm: use RCU extended quiescent state when running KVM guest

2015-02-06 Thread Paul E. McKenney
On Fri, Feb 06, 2015 at 02:50:44PM +0100, Paolo Bonzini wrote: On 06/02/2015 14:46, Frederic Weisbecker wrote: When running a KVM guest on a system with NOHZ_FULL enabled I just need to clarify the motivation first, does the above situation really happen? Ok some distros enable

Re: [PATCH 4/4] kvm,rcu: use RCU extended quiescent state when running KVM guest

2015-02-05 Thread Paul E. McKenney
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

Re: [PATCH 3/5] nohz,kvm: export context_tracking_user_enter/exit

2015-02-05 Thread Paul E. McKenney
On Thu, Feb 05, 2015 at 03:23:50PM -0500, r...@redhat.com wrote: From: Rik van Riel r...@redhat.com Export context_tracking_user_enter/exit so it can be used by KVM. Signed-off-by: Rik van Riel r...@redhat.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- kernel

Re: [PATCH 5/5] nohz: add stub context_tracking_is_enabled

2015-02-05 Thread Paul E. McKenney
CONFIG_CONTEXT_TRACKING is not set. Signed-off-by: Rik van Riel r...@redhat.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/context_tracking_state.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/context_tracking_state.h b/include/linux

Re: [PATCH 1/5] rcu,nohz: add state parameter to context_tracking_user_enter/exit

2015-02-05 Thread Paul E. McKenney
kernel guest transitions. Signed-off-by: Rik van Riel r...@redhat.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/context_tracking.h | 12 ++-- kernel/context_tracking.c| 10 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff

Re: [PATCH 4/5] kvm,rcu,nohz: use RCU extended quiescent state when running KVM guest

2015-02-05 Thread Paul E. McKenney
where they are, instead of moving them into the context tracking code. Signed-off-by: Rik van Riel r...@redhat.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- include/linux/context_tracking.h | 8 +++- include/linux/context_tracking_state.h | 1 + include/linux

Re: [PATCH 4/4] kvm,rcu: use RCU extended quiescent state when running KVM guest

2015-02-05 Thread Paul E. McKenney
On Thu, Feb 05, 2015 at 11:52:37AM -0500, Rik van Riel wrote: On 02/05/2015 11:44 AM, Christian Borntraeger wrote: Am 05.02.2015 um 17:35 schrieb r...@redhat.com: From: Rik van Riel r...@redhat.com The host kernel is not doing anything while the CPU is executing a KVM guest VCPU, so it

Re: [PATCH 4/4] kvm,rcu: use RCU extended quiescent state when running KVM guest

2015-02-05 Thread Paul E. McKenney
On Thu, Feb 05, 2015 at 01:09:19PM -0500, Rik van Riel wrote: On 02/05/2015 12:50 PM, Paul E. McKenney wrote: On Thu, Feb 05, 2015 at 11:52:37AM -0500, Rik van Riel wrote: On 02/05/2015 11:44 AM, Christian Borntraeger wrote: Am 05.02.2015 um 17:35 schrieb r...@redhat.com: From: Rik van

Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to be preempted

2015-01-22 Thread Paul E. McKenney
On Thu, Jan 22, 2015 at 03:16:57PM -0500, Steven Rostedt wrote: [ Added Paul McKenney ] On Thu, 22 Jan 2015 19:39:13 +0100 Luis R. Rodriguez mcg...@suse.com wrote: Why not make this a tracepoint? Then you can enable it only when you want to. As tracepoints are also hooks, you could

Re: compiler bug gcc4.6/4.7 with ACCESS_ONCE and workarounds

2014-11-10 Thread Paul E. McKenney
On Mon, Nov 10, 2014 at 01:07:33PM -0800, Linus Torvalds wrote: On Mon, Nov 10, 2014 at 12:18 PM, Christian Borntraeger borntrae...@de.ibm.com wrote: Now: I can reproduces belows miscompile on gcc46 and gcc 47 gcc 45 seems ok, gcc 48 is fixed. This makes blacklisting a bit hard,

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2013-12-05 Thread Paul E. McKenney
On Thu, Nov 28, 2013 at 10:55:06AM +0200, Gleb Natapov wrote: On Wed, Nov 27, 2013 at 09:06:36AM -0800, Paul E. McKenney wrote: On Wed, Nov 27, 2013 at 10:00:09AM +0200, Gleb Natapov wrote: On Tue, Nov 26, 2013 at 11:35:06AM -0800, Paul E. McKenney wrote: On Tue, Nov 26, 2013 at 06:24

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2013-11-27 Thread Paul E. McKenney
On Wed, Nov 27, 2013 at 10:00:09AM +0200, Gleb Natapov wrote: On Tue, Nov 26, 2013 at 11:35:06AM -0800, Paul E. McKenney wrote: On Tue, Nov 26, 2013 at 06:24:13PM +0200, Michael S. Tsirkin wrote: On Wed, Sep 12, 2012 at 08:13:54AM -0700, Paul E. McKenney wrote: On Wed, Sep 12, 2012 at 03

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2013-11-26 Thread Paul E. McKenney
On Tue, Nov 26, 2013 at 06:24:13PM +0200, Michael S. Tsirkin wrote: On Wed, Sep 12, 2012 at 08:13:54AM -0700, Paul E. McKenney wrote: On Wed, Sep 12, 2012 at 03:44:26PM +0300, Gleb Natapov wrote: On Wed, Sep 12, 2012 at 03:36:57PM +0300, Avi Kivity wrote: On 09/12/2012 03:34 PM, Gleb

Re: [PATCH RFC] kvm: optimize out smp_mb using srcu_read_unlock

2013-11-01 Thread Paul E. McKenney
On Thu, Oct 31, 2013 at 03:57:14PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 30, 2013 at 09:56:29PM -0700, Paul E. McKenney wrote: On Thu, Oct 31, 2013 at 01:26:05AM +0200, Michael S. Tsirkin wrote: Paul, could you review this patch please? Documentation/memory-barriers.txt says

Re: [PATCH RFC] kvm: optimize out smp_mb using srcu_read_unlock

2013-10-30 Thread Paul E. McKenney
On Wed, Oct 30, 2013 at 09:09:29PM +0200, Michael S. Tsirkin wrote: I noticed that srcu_read_lock/unlock both have a memory barrier, so just by moving srcu_read_unlock earlier we can get rid of one call to smp_mb(). Unsurprisingly, the gain is small but measureable using the unit test

Re: [PATCH RFC] kvm: optimize out smp_mb using srcu_read_unlock

2013-10-30 Thread Paul E. McKenney
On Thu, Oct 31, 2013 at 01:26:05AM +0200, Michael S. Tsirkin wrote: Paul, could you review this patch please? Documentation/memory-barriers.txt says that unlock has a weaker uni-directional barrier, but in practice srcu_read_unlock calls smp_mb(). Is it OK to rely on this? If

[PATCH tip/core/rcu 2/2] powerpc,kvm: fix imbalance srcu_read_[un]lock()

2013-05-20 Thread Paul E. McKenney
: Alexander Graf ag...@suse.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: kvm@vger.kernel.org Cc: kvm-...@vger.kernel.org Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com Reviewed-by: Josh Triplett j...@joshtriplett.org --- arch/powerpc/kvm

[PATCH tip/core/rcu 2/2] powerpc,kvm: fix imbalance srcu_read_[un]lock()

2013-05-20 Thread Paul E. McKenney
: Alexander Graf ag...@suse.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: k...@vger.kernel.org Cc: kvm-ppc@vger.kernel.org Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com Reviewed-by: Josh Triplett j...@joshtriplett.org --- arch/powerpc/kvm

Re: [PATCH] [RFC] s390/kvm: note a quiescing state if we interupt guest mode

2013-05-02 Thread Paul E. McKenney
dipan...@in.ibm.com Cc: Paul E. McKenney paul...@linux.vnet.ibm.com Cc: Martin Schwidefsky schwidef...@de.ibm.com Cc: Heiko Carstens heiko.carst...@de.ibm.com Cc: Gleb Natapov g...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com --- Hmmm... This looks like an interrupt. Can it interrupt

[PATCH tip/core/rcu 2/2] powerpc,kvm: Fix unbalanced srcu_read_[un]lock()

2013-04-12 Thread Paul E. McKenney
...@redhat.com Cc: Alexander Graf ag...@suse.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: kvm@vger.kernel.org Cc: kvm-...@vger.kernel.org Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed

[PATCH tip/core/rcu 2/2] powerpc,kvm: Fix unbalanced srcu_read_[un]lock()

2013-04-12 Thread Paul E. McKenney
...@redhat.com Cc: Alexander Graf ag...@suse.de Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: k...@vger.kernel.org Cc: kvm-ppc@vger.kernel.org Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed

Re: [PATCH 1/9] powerpc,kvm: fix imbalance srcu_read_[un]lock()

2013-04-11 Thread Paul E. McKenney
On Mon, Mar 18, 2013 at 08:26:48AM +1100, Paul Mackerras wrote: On Sat, Mar 16, 2013 at 12:50:49AM +0800, Lai Jiangshan wrote: At the point of up_out label in kvmppc_hv_setup_htab_rma(), srcu read lock is still held. We have to release it before return. Signed-off-by: Lai Jiangshan

Re: [PATCH 1/9] powerpc,kvm: fix imbalance srcu_read_[un]lock()

2013-04-11 Thread Paul E. McKenney
On Mon, Mar 18, 2013 at 08:26:48AM +1100, Paul Mackerras wrote: On Sat, Mar 16, 2013 at 12:50:49AM +0800, Lai Jiangshan wrote: At the point of up_out label in kvmppc_hv_setup_htab_rma(), srcu read lock is still held. We have to release it before return. Signed-off-by: Lai Jiangshan

Re: [PATCH] kvm, async_pf: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT

2012-10-19 Thread Paul E. McKenney
Levin sasha.le...@oracle.com Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com --- arch/x86/kernel/kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index b3e5e51..4180a87 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel

Re: [RFC v2 PATCH 04/21] x86: Avoid RCU warnings on slave CPUs

2012-09-20 Thread Paul E. McKenney
On Thu, Sep 06, 2012 at 08:27:40PM +0900, Tomoki Sekiyama wrote: Initialize rcu related variables to avoid warnings about RCU usage while slave CPUs is running specified functions. Also notify RCU subsystem before the slave CPU is entered into idle state. Hello, Tomoki, A few questions and

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2012-09-12 Thread Paul E. McKenney
On Wed, Sep 12, 2012 at 03:44:26PM +0300, Gleb Natapov wrote: On Wed, Sep 12, 2012 at 03:36:57PM +0300, Avi Kivity wrote: On 09/12/2012 03:34 PM, Gleb Natapov wrote: On Wed, Sep 12, 2012 at 10:45:22AM +0300, Avi Kivity wrote: On 09/12/2012 04:03 AM, Paul E. McKenney wrote: Paul, I'd

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2012-09-11 Thread Paul E. McKenney
On Tue, Sep 11, 2012 at 05:10:23PM +0300, Michael S. Tsirkin wrote: On Tue, Sep 11, 2012 at 04:02:25PM +0300, Gleb Natapov wrote: Most interrupt are delivered to only one vcpu. Use pre-build tables to find interrupt destination instead of looping through all vcpus. In case of logical mode

Re: [PATCHv2] KVM: optimize apic interrupt delivery

2012-09-11 Thread Paul E. McKenney
On Wed, Sep 12, 2012 at 01:33:37AM +0300, Michael S. Tsirkin wrote: On Tue, Sep 11, 2012 at 10:13:00AM -0700, Paul E. McKenney wrote: On Tue, Sep 11, 2012 at 05:10:23PM +0300, Michael S. Tsirkin wrote: On Tue, Sep 11, 2012 at 04:02:25PM +0300, Gleb Natapov wrote: Most interrupt

Re: Testing tracer wakeup_rt: .. no entries found ..FAILED!

2012-07-31 Thread Paul E. McKenney
On Tue, Jul 31, 2012 at 07:51:39PM -0400, Steven Rostedt wrote: On Wed, 2012-08-01 at 07:43 +0800, Fengguang Wu wrote: On Tue, Jul 31, 2012 at 09:13:39AM -0400, Steven Rostedt wrote: On Tue, 2012-07-31 at 15:50 +0300, Avi Kivity wrote: On 07/31/2012 03:43 PM, Steven Rostedt wrote:

Re: Testing tracer wakeup_rt: .. no entries found ..FAILED!

2012-07-31 Thread Paul E. McKenney
On Tue, Jul 31, 2012 at 08:09:38PM -0400, Steven Rostedt wrote: On Tue, 2012-07-31 at 16:57 -0700, Paul E. McKenney wrote: What was the next lines? I bet you it was PASSED. Which means it did not fail. This is the second bug you found that has to do with RCU being called in 'idle

Re: possible circular locking dependency

2012-05-06 Thread Paul E. McKenney
On Sun, May 06, 2012 at 11:55:30AM +0300, Avi Kivity wrote: On 05/03/2012 11:02 PM, Sergey Senozhatsky wrote: Hello, 3.4-rc5 Whoa. Looks like inconsistent locking between cpufreq and synchronize_srcu_expedited(). kvm triggered this because it is one of the few users of

Re: possible circular locking dependency

2012-05-06 Thread Paul E. McKenney
On Sun, May 06, 2012 at 11:34:39PM +0300, Sergey Senozhatsky wrote: On (05/06/12 09:42), Paul E. McKenney wrote: On Sun, May 06, 2012 at 11:55:30AM +0300, Avi Kivity wrote: On 05/03/2012 11:02 PM, Sergey Senozhatsky wrote: Hello, 3.4-rc5 Whoa. Looks like inconsistent

Re: [RFC PATCH v1 3/5] KVM: Add paravirt kvm_flush_tlb_others

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 06:16:46PM +0200, Peter Zijlstra wrote: On Tue, 2012-05-01 at 18:36 +0300, Avi Kivity wrote: What bounds the amount of memory waiting to be freed during an rcu grace period? Most RCU implementations don't have limits, so that could be quite a lot. I

Re: async pf: INFO: SOFTIRQ-safe - SOFTIRQ-unsafe lock order detected

2012-04-27 Thread Paul E. McKenney
On Thu, Apr 26, 2012 at 04:50:35PM +0200, Sasha Levin wrote: Hi all. I got a INFO: SOFTIRQ-safe - SOFTIRQ-unsafe lock order detected warning while running LTP inside a KVM guest using the recent -next kernel. It seems that it was initially originated from rcu_torture_rea(), but I don't

Re: async pf: INFO: SOFTIRQ-safe - SOFTIRQ-unsafe lock order detected

2012-04-27 Thread Paul E. McKenney
On Fri, Apr 27, 2012 at 08:05:15PM +0200, Sasha Levin wrote: On Fri, Apr 27, 2012 at 5:23 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Thu, Apr 26, 2012 at 04:50:35PM +0200, Sasha Levin wrote: Hi all. I got a INFO: SOFTIRQ-safe - SOFTIRQ-unsafe lock order detected

Re: kvm: RCU warning in async pf

2012-04-04 Thread Paul E. McKenney
from an exception or interrupt handler, not from process-level code? If so: Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index f0c6fd6..380079f 100644 --- a/arch/x86/kernel

Re: kvm: RCU warning in async pf

2012-04-03 Thread Paul E. McKenney
On Mon, Apr 02, 2012 at 08:54:32PM -0400, Sasha Levin wrote: Hi all, I got the spew at the bottom of the mail in a KVM guest using the KVM tools and running trinity. I'm not quite sure how default_idle managed to trigger a pagefault, so that part looks odd to me. Wrapping the offending

Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-02-01 Thread Paul E. McKenney
On Wed, Feb 01, 2012 at 11:22:29AM +0100, Peter Zijlstra wrote: On Tue, 2012-01-31 at 14:24 -0800, Paul E. McKenney wrote: Can we get it back to speed by scheduling a work function on all cpus? wouldn't that force a quiescent state and allow call_srcu() to fire? In kvm's use

Re: [RFC][PATCH] srcu: Implement call_srcu()

2012-01-31 Thread Paul E. McKenney
On Tue, Jan 31, 2012 at 02:50:07PM +0100, Peter Zijlstra wrote: On Tue, 2012-01-31 at 15:47 +0200, Avi Kivity wrote: They really need to return quickly to userspace, and they really need to perform some operation between rcu_assign_pointer() and returning, so no. Bugger :/

RCU treating guest mode just like it does user-mode execution

2011-08-17 Thread Paul E. McKenney
Hello, Gleb, I was looking at KVM's call to rcu_virt_note_context_switch() in kvm_guest_enter(), and noting the comment talking about treating guest mode like user-mode execution is. One difference between RCU's treatment of KVM guest execution and user-mode execution is that RCU notes a context

Re: RCU treating guest mode just like it does user-mode execution

2011-08-17 Thread Paul E. McKenney
On Thu, Aug 18, 2011 at 12:50:15AM +0300, Gleb Natapov wrote: On Wed, Aug 17, 2011 at 01:43:27PM -0700, Paul E. McKenney wrote: Hello, Gleb, I was looking at KVM's call to rcu_virt_note_context_switch() in kvm_guest_enter(), and noting the comment talking about treating guest mode like

Re: RCU treating guest mode just like it does user-mode execution

2011-08-17 Thread Paul E. McKenney
On Thu, Aug 18, 2011 at 02:55:29AM +0300, Gleb Natapov wrote: On Wed, Aug 17, 2011 at 03:05:20PM -0700, Paul E. McKenney wrote: On Thu, Aug 18, 2011 at 12:50:15AM +0300, Gleb Natapov wrote: On Wed, Aug 17, 2011 at 01:43:27PM -0700, Paul E. McKenney wrote: Hello, Gleb, I

Re: RCU treating guest mode just like it does user-mode execution

2011-08-17 Thread Paul E. McKenney
On Wed, Aug 17, 2011 at 05:28:46PM -0700, Avi Kivity wrote: On 08/17/2011 05:25 PM, Paul E. McKenney wrote: Wouldn't scheduling-clock interrupt kick vcpu out of a guest mode much earlier then 30 seconds? The scheduling-clock interrupt would happen, but I do not know whether

Re: [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-12 Thread Paul E. McKenney
On Fri, Aug 12, 2011 at 09:55:20AM +0800, Jason Wang wrote: With the abstraction that each socket were a backend of a queue for userspace, this patch adds multiqueue support for tap device by allowing multiple sockets to be attached to a tap device. Then we could parallize the transmission by

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-14 Thread Paul E. McKenney
scheduler lock contention, which might well be the cause of the problems that you are seeing. Thanx, Paul On Sat, 2011-06-04 at 09:30 -0700, Paul E. McKenney wrote: On Sat, Jun 04, 2011 at 09:26:15AM +0300, Sasha Levin wrote: On Fri

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-14 Thread Paul E. McKenney
On Tue, Jun 14, 2011 at 09:25:22PM -0400, Sasha Levin wrote: On Tue, 2011-06-14 at 16:42 -0700, Paul E. McKenney wrote: On Tue, Jun 14, 2011 at 06:26:01PM -0400, Sasha Levin wrote: Sorry for the delay on this. Actually, you might have had excellent timing on this one. Could you

Re: [PATCH 10/15] KVM: MMU: lockless walking shadow page table

2011-06-09 Thread Paul E. McKenney
On Tue, Jun 07, 2011 at 09:04:34PM +0800, Xiao Guangrong wrote: Using rcu to protect shadow pages table to be freed, so we can safely walk it, it should run fast and is needed by mmio page fault A couple of question below. Thanx, Paul

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-04 Thread Paul E. McKenney
On Sat, Jun 04, 2011 at 09:26:15AM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 16:05 -0700, Paul E. McKenney wrote: On Sat, Jun 04, 2011 at 01:54:45AM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 14:20 -0700, Paul E. McKenney wrote: On Sat, Jun 04, 2011 at 12:03:59AM +0300, Sasha

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-03 Thread Paul E. McKenney
might have caused this issue. I've bisected guest kernels and found that the problem starts with: a26ac2455ffcf3be5c6ef92bc6df7182700f2114 is the first bad commit commit a26ac2455ffcf3be5c6ef92bc6df7182700f2114 Author: Paul E. McKenney paul.mcken...@linaro.org Date: Wed Jan 12

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-03 Thread Paul E. McKenney
On Fri, Jun 03, 2011 at 10:56:20PM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 12:31 -0700, Paul E. McKenney wrote: On Fri, Jun 03, 2011 at 10:54:19AM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 09:34 +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-03 Thread Paul E. McKenney
On Sat, Jun 04, 2011 at 12:03:59AM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 13:22 -0700, Paul E. McKenney wrote: On Fri, Jun 03, 2011 at 10:56:20PM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 12:31 -0700, Paul E. McKenney wrote: On Fri, Jun 03, 2011 at 10:54:19AM +0300, Sasha

Re: [PATCH v2 6/8] kvm tools: Add rwlock wrapper

2011-06-03 Thread Paul E. McKenney
On Sat, Jun 04, 2011 at 01:54:45AM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 14:20 -0700, Paul E. McKenney wrote: On Sat, Jun 04, 2011 at 12:03:59AM +0300, Sasha Levin wrote: On Fri, 2011-06-03 at 13:22 -0700, Paul E. McKenney wrote: On Fri, Jun 03, 2011 at 10:56:20PM +0300, Sasha

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-29 Thread Paul E. McKenney
On Sun, May 29, 2011 at 09:19:48AM +0200, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: Yes, this is equivalent to the kernel's stop_machine_run(). It's a heavyweight method but it should work just fine. Yeah. It is fine for reconfiguration/configuration-only kind of write

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-29 Thread Paul E. McKenney
On Sun, May 29, 2011 at 06:00:00PM +0300, Avi Kivity wrote: On 05/29/2011 05:27 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: I don't understand how you expect per_cpu to work in userspace. As soon as you calculate the per-cpu address, it can be invalidated. It doesn't

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-29 Thread Paul E. McKenney
On Sun, May 29, 2011 at 08:31:30AM -0700, Paul E. McKenney wrote: On Sun, May 29, 2011 at 09:19:48AM +0200, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: Yes, this is equivalent to the kernel's stop_machine_run(). It's a heavyweight method but it should work just fine

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-29 Thread Paul E. McKenney
On Sun, May 29, 2011 at 09:33:27PM +0200, Ingo Molnar wrote: * Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Sun, May 29, 2011 at 06:00:00PM +0300, Avi Kivity wrote: On 05/29/2011 05:27 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: I don't understand how

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-29 Thread Paul E. McKenney
On Sun, May 29, 2011 at 09:54:50PM +0200, Ingo Molnar wrote: * Paul E. McKenney paul...@linux.vnet.ibm.com wrote: And the other reason that you want to mark the readers is for debug purposes. Murphy being who he is, you will some day need to check for someone calling the OK to update

Re: RCU red-black tree (was: Re: [PATCH 4/6] kvm tools: Add rwlock wrapper)

2011-05-29 Thread Paul E. McKenney
On Sun, May 29, 2011 at 01:01:04PM -0400, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: [...] Hi Mathieu! In tools/kvm/ we use a rb-tree (same one used by the kernel) with the augmentation

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-28 Thread Paul E. McKenney
On Sat, May 28, 2011 at 05:24:08PM +0200, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: So the basic plan here is to allocate a futex(?) for each VCPU thread, and have the writer thread lock all futexes when it needs to write? If we assume we only have one

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-27 Thread Paul E. McKenney
On Fri, May 27, 2011 at 11:12:20AM +0200, Ingo Molnar wrote: * Paul E. McKenney paul...@linux.vnet.ibm.com wrote: I'm CC'ing Paul and Mathieu as well for urcu. I am hoping we can get better convergence between the user-level and kernel-level URCU implementations once I get SRCU

Re: [PATCH 4/6] kvm tools: Add rwlock wrapper

2011-05-26 Thread Paul E. McKenney
On Thu, May 26, 2011 at 07:05:08PM -0400, Mathieu Desnoyers wrote: * Ingo Molnar (mi...@elte.hu) wrote: * Pekka Enberg penb...@kernel.org wrote: On Thu, May 26, 2011 at 9:11 PM, Avi Kivity a...@redhat.com wrote: On 05/26/2011 09:05 PM, Ingo Molnar wrote:  I've added

Re: [PATCH 1/2] rcu: provide rcu_virt_note_context_switch() function.

2011-05-09 Thread Paul E. McKenney
On Mon, May 09, 2011 at 11:51:34AM +0300, Avi Kivity wrote: On 05/04/2011 07:35 PM, Paul E. McKenney wrote: On Wed, May 04, 2011 at 04:31:03PM +0300, Gleb Natapov wrote: Provide rcu_virt_note_context_switch() for vitalization use to note quiescent state during guest entry. Very good

Re: [PATCH 1/2] rcu: provide rcu_virt_note_context_switch() function.

2011-05-04 Thread Paul E. McKenney
On Wed, May 04, 2011 at 04:31:03PM +0300, Gleb Natapov wrote: Provide rcu_virt_note_context_switch() for vitalization use to note quiescent state during guest entry. Very good, queued on -rcu. Unless you tell me otherwise, I will assume that you want to carry the patch modifying KVM to use

Re: [PATCH 1/2] rcu: export rcu_note_context_switch() function

2011-05-03 Thread Paul E. McKenney
On Mon, May 02, 2011 at 05:10:03PM +0300, Gleb Natapov wrote: On Mon, May 02, 2011 at 06:36:08AM -0700, Paul E. McKenney wrote: On Mon, May 02, 2011 at 01:56:12PM +0300, Gleb Natapov wrote: On Sat, Apr 30, 2011 at 05:59:28AM -0700, Paul E. McKenney wrote: On Fri, Apr 29, 2011 at 09:02

Re: [PATCH 1/2] rcu: export rcu_note_context_switch() function

2011-05-02 Thread Paul E. McKenney
On Mon, May 02, 2011 at 01:56:12PM +0300, Gleb Natapov wrote: On Sat, Apr 30, 2011 at 05:59:28AM -0700, Paul E. McKenney wrote: On Fri, Apr 29, 2011 at 09:02:39PM +0300, Gleb Natapov wrote: On Fri, Apr 29, 2011 at 01:39:04AM -0700, Paul E. McKenney wrote: On Fri, Apr 29, 2011 at 01:36

Re: [PATCH 1/2] rcu: export rcu_note_context_switch() function

2011-04-30 Thread Paul E. McKenney
On Fri, Apr 29, 2011 at 09:02:39PM +0300, Gleb Natapov wrote: On Fri, Apr 29, 2011 at 01:39:04AM -0700, Paul E. McKenney wrote: On Fri, Apr 29, 2011 at 01:36:18AM -0700, Paul E. McKenney wrote: On Thu, Apr 28, 2011 at 12:52:02PM +0300, Gleb Natapov wrote: Hmmm This is interesting

Re: [PATCH 1/2] rcu: export rcu_note_context_switch() function

2011-04-29 Thread Paul E. McKenney
On Fri, Apr 29, 2011 at 01:36:18AM -0700, Paul E. McKenney wrote: On Thu, Apr 28, 2011 at 12:52:02PM +0300, Gleb Natapov wrote: Hmmm This is interesting. KVM being a module, we either expand TINY_RCU's size a bit by making rcu_note_context_switch() be a real function in rcutiny.c

Re: [PATCH 1/2] rcu: export rcu_note_context_switch() function

2011-04-29 Thread Paul E. McKenney
On Thu, Apr 28, 2011 at 12:52:02PM +0300, Gleb Natapov wrote: Hmmm This is interesting. KVM being a module, we either expand TINY_RCU's size a bit by making rcu_note_context_switch() be a real function in rcutiny.c and adding an export, or we expand it by adding two exports. I would like

Re: RCU+KVM: making CPU guest mode a quiescent state.

2011-04-27 Thread Paul E. McKenney
On Wed, Apr 27, 2011 at 10:47:04AM +0300, Avi Kivity wrote: On 04/26/2011 06:55 PM, Paul E. McKenney wrote: On Tue, Apr 26, 2011 at 03:38:24PM +0300, Gleb Natapov wrote: Hello Paul, I have a question about RCU + KVM. KVM does not hold any references to RCU protected data when

Re: RCU+KVM: making CPU guest mode a quiescent state.

2011-04-27 Thread Paul E. McKenney
On Wed, Apr 27, 2011 at 03:41:41PM +0300, Gleb Natapov wrote: On Tue, Apr 26, 2011 at 08:55:28AM -0700, Paul E. McKenney wrote: On Tue, Apr 26, 2011 at 03:38:24PM +0300, Gleb Natapov wrote: Hello Paul, I have a question about RCU + KVM. KVM does not hold any references to RCU

Re: RCU+KVM: making CPU guest mode a quiescent state.

2011-04-26 Thread Paul E. McKenney
On Tue, Apr 26, 2011 at 03:38:24PM +0300, Gleb Natapov wrote: 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

Re: [PATCH] vhost: rcu annotation fixup

2011-01-18 Thread Paul E. McKenney
On Tue, Jan 18, 2011 at 01:08:45PM +0200, Michael S. Tsirkin wrote: When built with rcu checks enabled, vhost triggers bogus warnings as vhost features are read without dev-mutex sometimes. Fixing it properly is not trivial as vhost.h does not know which lockdep classes it will be used under.

Re: [PATCH] vhost: rcu annotation fixup

2011-01-18 Thread Paul E. McKenney
On Tue, Jan 18, 2011 at 07:55:00PM +0200, Michael S. Tsirkin wrote: On Tue, Jan 18, 2011 at 09:48:34AM -0800, Paul E. McKenney wrote: On Tue, Jan 18, 2011 at 01:08:45PM +0200, Michael S. Tsirkin wrote: When built with rcu checks enabled, vhost triggers bogus warnings as vhost features

Re: [PATCH] vhost: rcu annotation fixup

2011-01-18 Thread Paul E. McKenney
On Tue, Jan 18, 2011 at 10:10:31PM +0200, Michael S. Tsirkin wrote: On Tue, Jan 18, 2011 at 11:02:33AM -0800, Paul E. McKenney wrote: On Tue, Jan 18, 2011 at 07:55:00PM +0200, Michael S. Tsirkin wrote: On Tue, Jan 18, 2011 at 09:48:34AM -0800, Paul E. McKenney wrote: On Tue, Jan 18, 2011

Re: [PATCH 1/2] vhost test module

2010-12-04 Thread Paul E. McKenney
On Thu, Dec 02, 2010 at 03:56:56PM -0800, Paul E. McKenney wrote: On Fri, Dec 03, 2010 at 01:18:18AM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 03:13:03PM -0800, Paul E. McKenney wrote: On Thu, Dec 02, 2010 at 09:47:09PM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010

Re: [PATCH 1/2] vhost test module

2010-12-02 Thread Paul E. McKenney
On Mon, Nov 29, 2010 at 07:09:01PM +0200, Michael S. Tsirkin wrote: This adds a test module for vhost infrastructure. Intentionally not tied to kbuild to prevent people from installing and loading it accidentally. Signed-off-by: Michael S. Tsirkin m...@redhat.com On question below. ---

Re: [PATCH 1/2] vhost test module

2010-12-02 Thread Paul E. McKenney
On Thu, Dec 02, 2010 at 09:11:30PM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 11:00:37AM -0800, Paul E. McKenney wrote: On Mon, Nov 29, 2010 at 07:09:01PM +0200, Michael S. Tsirkin wrote: This adds a test module for vhost infrastructure. Intentionally not tied to kbuild

Re: [PATCH 1/2] vhost test module

2010-12-02 Thread Paul E. McKenney
On Thu, Dec 02, 2010 at 09:47:09PM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 11:26:16AM -0800, Paul E. McKenney wrote: On Thu, Dec 02, 2010 at 09:11:30PM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 11:00:37AM -0800, Paul E. McKenney wrote: On Mon, Nov 29, 2010

Re: [PATCH 1/2] vhost test module

2010-12-02 Thread Paul E. McKenney
On Fri, Dec 03, 2010 at 01:18:18AM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 03:13:03PM -0800, Paul E. McKenney wrote: On Thu, Dec 02, 2010 at 09:47:09PM +0200, Michael S. Tsirkin wrote: On Thu, Dec 02, 2010 at 11:26:16AM -0800, Paul E. McKenney wrote: On Thu, Dec 02, 2010

  1   2   >