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

2015-02-09 Thread Rik van Riel
-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 +, r...@redhat.com wrote:
 Apologies to Catalin and Will for not fixing up ARM. I am not 
 familiar with ARM assembly, and not sure how to pass a constant 
 argument to a function from assembly code on ARM :)
 
 It's a bit of a faff getting enum values into asm -- we actually
 have to duplicate the definitions using #defines to get at the
 constants. Perhaps it would be cleaner to leave
 context_tracking_user_{enter,exit} intact as C wrappers around
 context_tracking_{enter,exit} passing the appropriate constant?
 That way we don't actually need to change the arch code at all.

If Paul and Frederic have no objections, I would be happy to do that.

Paul, Frederic?

- -- 
All rights reversed
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJU2V1zAAoJEM553pKExN6D6g0IALbbBouimRFvTEvET5mspC7i
DDn9AZJ8lMfbtgeMQsNFsJqfXu0lM8lwczPMKoAz/op31p0pdPlykYIm9fmCdqik
rNFTIRRd8fPD3JJVjNu8lpmVsae9VQuaDX7/36OK5d36bIpPfZ1yj6dxOdL4p5oI
xYcnw1Re1rUmtykQo3i6V6379EPz8azSqxFRcP+Kf9kq3FLzHwzs+TwkOprGSWE4
B4wNVQMn+bLir/vQlS0+0NYcYXDyMllGQWm0Z8mBhUhjvHhP0rQ0UplHQk+zDOaN
slEOKAIEtfikAm9ugv25cylCJ6ko+DOrP1aZ994BQ7E9AxmBnzz0EN6i5NAIJ1s=
=msX3
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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 +, r...@redhat.com wrote:
   Apologies to Catalin and Will for not fixing up ARM. I am not 
   familiar with ARM assembly, and not sure how to pass a constant 
   argument to a function from assembly code on ARM :)
   
   It's a bit of a faff getting enum values into asm -- we actually
   have to duplicate the definitions using #defines to get at the
   constants. Perhaps it would be cleaner to leave
   context_tracking_user_{enter,exit} intact as C wrappers around
   context_tracking_{enter,exit} passing the appropriate constant?
   That way we don't actually need to change the arch code at all.
  
  If Paul and Frederic have no objections, I would be happy to do that.
  
  Paul, Frederic?
 
 Sure, that's fine by me.

And if it is fine by Frederic, it is fine by me!

Thanx, Paul

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-02-09 Thread Rik van Riel
-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:
 -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 +, r...@redhat.com
 wrote:
 Apologies to Catalin and Will for not fixing up ARM. I am
 not familiar with ARM assembly, and not sure how to pass a
 constant argument to a function from assembly code on ARM
 :)
 
 It's a bit of a faff getting enum values into asm -- we
 actually have to duplicate the definitions using #defines to
 get at the constants. Perhaps it would be cleaner to leave 
 context_tracking_user_{enter,exit} intact as C wrappers
 around context_tracking_{enter,exit} passing the appropriate
 constant? That way we don't actually need to change the arch
 code at all.
 
 If Paul and Frederic have no objections, I would be happy to do
 that.
 
 Paul, Frederic?
 
 Sure, that's fine by me.
 
 And if it is fine by Frederic, it is fine by me!

I'll send a new series tomorrow that addresses Will's concern,
as well as Paulo's latest suggestions.

- -- 
All rights reversed
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJU2XTsAAoJEM553pKExN6D2ZcH/R7KIkJLpaWwxM2Iy0iEy+9r
CA2Tem1wXiDRMLzvDEKQHGlX8ea2o/VWNwjSMeRzDJbd3D9wsfPBMROXOXuji3Cc
FI2XBrC+fax43vWaIcKDb/GrQanffed2VZ1klL2twTShUOaSBPXFofZ1DISvrySP
//QOe7DbgYpqYJZ2KC+KohclvIkepAbo3AuiZKj97staw4IzP4kVJi1zAk0qbDDQ
6m7X4hvHnkfiSx0YLNRJ54j3i9/py5/rbUlnNP9LAxdQzOQQCFUSUKnn9zIMBZ03
e1W77VAQLI9+URXgeuSn7928PE+eqQQJwwdLzt0ckVojJL3i8J5SfoxTMr1sZh0=
=ft08
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-02-09 Thread riel
When running a KVM guest on a system with NOHZ_FULL enabled, and the
KVM guest running with idle=poll mode, we still get wakeups of the
rcuos/N threads.

This problem has already been solved for user space by telling the
RCU subsystem that the CPU is in an extended quiescent state while
running user space code.

This patch series extends that code a little bit to make it usable
to track KVM guest space, too.

I tested the code by booting a KVM guest with idle=poll, on a system
with NOHZ_FULL enabled on most CPUs, and a VCPU thread bound to a
CPU. In a 10 second interval, rcuos/N threads on other CPUs got woken
up several times, while the rcuos thread on the CPU running the bound
and alwasy running VCPU thread never got woken up once.

Thanks to Christian Borntraeger and Paul McKenney for reviewing the
first version of this patch series, and helping optimize patch 4/5.
Thanks to Frederic Weisbecker for further enhancements.

Apologies to Catalin and Will for not fixing up ARM. I am not
familiar with ARM assembly, and not sure how to pass a constant
argument to a function from assembly code on ARM :)

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-02-09 Thread Will Deacon
Hi Rik,

On Mon, Feb 09, 2015 at 04:04:38PM +, r...@redhat.com wrote:
 Apologies to Catalin and Will for not fixing up ARM. I am not
 familiar with ARM assembly, and not sure how to pass a constant
 argument to a function from assembly code on ARM :)

It's a bit of a faff getting enum values into asm -- we actually have to
duplicate the definitions using #defines to get at the constants. Perhaps it
would be cleaner to leave context_tracking_user_{enter,exit} intact as C
wrappers around context_tracking_{enter,exit} passing the appropriate
constant? That way we don't actually need to change the arch code at all.

Will
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-02-09 Thread Frederic Weisbecker
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 +, r...@redhat.com wrote:
  Apologies to Catalin and Will for not fixing up ARM. I am not 
  familiar with ARM assembly, and not sure how to pass a constant 
  argument to a function from assembly code on ARM :)
  
  It's a bit of a faff getting enum values into asm -- we actually
  have to duplicate the definitions using #defines to get at the
  constants. Perhaps it would be cleaner to leave
  context_tracking_user_{enter,exit} intact as C wrappers around
  context_tracking_{enter,exit} passing the appropriate constant?
  That way we don't actually need to change the arch code at all.
 
 If Paul and Frederic have no objections, I would be happy to do that.
 
 Paul, Frederic?

Sure, that's fine by me.

Thanks.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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:
  -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 +, r...@redhat.com
  wrote:
  Apologies to Catalin and Will for not fixing up ARM. I am
  not familiar with ARM assembly, and not sure how to pass a
  constant argument to a function from assembly code on ARM
  :)
  
  It's a bit of a faff getting enum values into asm -- we
  actually have to duplicate the definitions using #defines to
  get at the constants. Perhaps it would be cleaner to leave 
  context_tracking_user_{enter,exit} intact as C wrappers
  around context_tracking_{enter,exit} passing the appropriate
  constant? That way we don't actually need to change the arch
  code at all.
  
  If Paul and Frederic have no objections, I would be happy to do
  that.
  
  Paul, Frederic?
  
  Sure, that's fine by me.
  
  And if it is fine by Frederic, it is fine by me!
 
 I'll send a new series tomorrow that addresses Will's concern,
 as well as Paulo's latest suggestions.

Very good, thank you!

Thanx, Paul

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html