Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-05 Thread Paul E. McKenney
On Thu, Mar 05, 2015 at 04:17:59PM -0500, Boris Ostrovsky wrote: > On 03/04/2015 10:25 AM, Paul E. McKenney wrote: > >On Wed, Mar 04, 2015 at 09:55:11AM -0500, Boris Ostrovsky wrote: > > >>The simple solution is to stop calling native_cpu_die() above but > >>I'd like to use common code in

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-05 Thread Boris Ostrovsky
On 03/04/2015 10:25 AM, Paul E. McKenney wrote: On Wed, Mar 04, 2015 at 09:55:11AM -0500, Boris Ostrovsky wrote: The simple solution is to stop calling native_cpu_die() above but I'd like to use common code in native_cpu_die(). I'll see if I can carve it out without too much damage to x86.

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-05 Thread Boris Ostrovsky
On 03/04/2015 10:25 AM, Paul E. McKenney wrote: On Wed, Mar 04, 2015 at 09:55:11AM -0500, Boris Ostrovsky wrote: The simple solution is to stop calling native_cpu_die() above but I'd like to use common code in native_cpu_die(). I'll see if I can carve it out without too much damage to x86.

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-05 Thread Paul E. McKenney
On Thu, Mar 05, 2015 at 04:17:59PM -0500, Boris Ostrovsky wrote: On 03/04/2015 10:25 AM, Paul E. McKenney wrote: On Wed, Mar 04, 2015 at 09:55:11AM -0500, Boris Ostrovsky wrote: The simple solution is to stop calling native_cpu_die() above but I'd like to use common code in native_cpu_die().

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Boris Ostrovsky
On 03/04/2015 10:45 AM, David Vrabel wrote: On 04/03/15 14:55, Boris Ostrovsky wrote: In the meantime, it turned out that HVM guests are broken by this patch (with our without changes that we've been discussing), because HVM CPUs die with static void xen_hvm_cpu_die(unsigned int cpu) {

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread David Vrabel
On 04/03/15 14:55, Boris Ostrovsky wrote: > > In the meantime, it turned out that HVM guests are broken by this patch > (with our without changes that we've been discussing), because HVM CPUs > die with > > static void xen_hvm_cpu_die(unsigned int cpu) > { > xen_cpu_die(cpu); >

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Paul E. McKenney
On Wed, Mar 04, 2015 at 09:55:11AM -0500, Boris Ostrovsky wrote: > On 03/04/2015 09:43 AM, Paul E. McKenney wrote: > >On Tue, Mar 03, 2015 at 02:31:51PM -0800, Paul E. McKenney wrote: > >>On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: > >>>On 03/03/2015 04:26 PM, Paul E. McKenney

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Boris Ostrovsky
On 03/04/2015 09:43 AM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:31:51PM -0800, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: On 03/03/2015 04:26 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote:

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 02:31:51PM -0800, Paul E. McKenney wrote: > On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: > > On 03/03/2015 04:26 PM, Paul E. McKenney wrote: > > >On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: > > >>On 03/03/2015 02:42 PM, Paul E.

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread David Vrabel
On 04/03/15 14:55, Boris Ostrovsky wrote: In the meantime, it turned out that HVM guests are broken by this patch (with our without changes that we've been discussing), because HVM CPUs die with static void xen_hvm_cpu_die(unsigned int cpu) { xen_cpu_die(cpu);

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Paul E. McKenney
On Wed, Mar 04, 2015 at 09:55:11AM -0500, Boris Ostrovsky wrote: On 03/04/2015 09:43 AM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:31:51PM -0800, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: On 03/03/2015 04:26 PM, Paul E. McKenney wrote:

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Boris Ostrovsky
On 03/04/2015 10:45 AM, David Vrabel wrote: On 04/03/15 14:55, Boris Ostrovsky wrote: In the meantime, it turned out that HVM guests are broken by this patch (with our without changes that we've been discussing), because HVM CPUs die with static void xen_hvm_cpu_die(unsigned int cpu) {

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 02:31:51PM -0800, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: On 03/03/2015 04:26 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: On 03/03/2015 02:42 PM, Paul E. McKenney wrote:

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-04 Thread Boris Ostrovsky
On 03/04/2015 09:43 AM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:31:51PM -0800, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: On 03/03/2015 04:26 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote:

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: > On 03/03/2015 04:26 PM, Paul E. McKenney wrote: > >On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: > >>On 03/03/2015 02:42 PM, Paul E. McKenney wrote: > >>>On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Boris Ostrovsky
On 03/03/2015 04:26 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: On 03/03/2015 02:42 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: > On 03/03/2015 02:42 PM, Paul E. McKenney wrote: > >On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: > >>On 03/03/2015 12:42 PM, Paul E. McKenney wrote: > >>> } > >>>@@ -511,7 +508,8 @@ static void

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Boris Ostrovsky
On 03/03/2015 02:42 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) schedule_timeout(HZ/10); } -

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: > On 03/03/2015 12:42 PM, Paul E. McKenney wrote: > > } > >@@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) > > schedule_timeout(HZ/10); > > } > >-cpu_die_common(cpu); > >+

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Boris Ostrovsky
On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) schedule_timeout(HZ/10); } - cpu_die_common(cpu); + (void)cpu_wait_death(cpu, 5); + /* FIXME: Are the below calls really safe in case of

[PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
From: "Paul E. McKenney" This commit removes the open-coded CPU-offline notification with new common code. Among other things, this change avoids calling scheduler code using RCU from an offline CPU that RCU is ignoring. It also allows Xen to notice at online time that the CPU did not go

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) schedule_timeout(HZ/10); } -cpu_die_common(cpu); +(void)cpu_wait_death(cpu, 5); +

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Boris Ostrovsky
On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) schedule_timeout(HZ/10); } - cpu_die_common(cpu); + (void)cpu_wait_death(cpu, 5); + /* FIXME: Are the below calls really safe in case of

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Boris Ostrovsky
On 03/03/2015 02:42 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu) schedule_timeout(HZ/10); } -

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Boris Ostrovsky
On 03/03/2015 04:26 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: On 03/03/2015 02:42 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: On 03/03/2015 02:42 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On 03/03/2015 12:42 PM, Paul E. McKenney wrote: } @@ -511,7 +508,8 @@ static void xen_cpu_die(unsigned int cpu)

Re: [PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
On Tue, Mar 03, 2015 at 05:06:50PM -0500, Boris Ostrovsky wrote: On 03/03/2015 04:26 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 03:13:07PM -0500, Boris Ostrovsky wrote: On 03/03/2015 02:42 PM, Paul E. McKenney wrote: On Tue, Mar 03, 2015 at 02:17:24PM -0500, Boris Ostrovsky wrote: On

[PATCH tip/core/rcu 02/20] x86: Use common outgoing-CPU-notification code

2015-03-03 Thread Paul E. McKenney
From: Paul E. McKenney paul...@linux.vnet.ibm.com This commit removes the open-coded CPU-offline notification with new common code. Among other things, this change avoids calling scheduler code using RCU from an offline CPU that RCU is ignoring. It also allows Xen to notice at online time that