Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Paul E. McKenney
On Fri, Sep 19, 2014 at 12:55:11AM +0200, Rafael J. Wysocki wrote: > On Thursday, September 18, 2014 05:38:45 AM Paul E. McKenney wrote: > > On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote: > > > On 2014年09月17日 21:10, Paul E. McKenney wrote: > > > > On Wed, Sep 17, 2014 at 03:11:42PM

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Rafael J. Wysocki
On Thursday, September 18, 2014 05:38:45 AM Paul E. McKenney wrote: > On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote: > > On 2014年09月17日 21:10, Paul E. McKenney wrote: > > > On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: > > >> On 2014年08月29日 03:47, Paul E. McKenney wrote:

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Paul E. McKenney
On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote: > On 2014年09月17日 21:10, Paul E. McKenney wrote: > > On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: > >> On 2014年08月29日 03:47, Paul E. McKenney wrote: > >>> Currently, the expedited grace-period primitives do

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Lan Tianyu
On 2014年09月17日 21:10, Paul E. McKenney wrote: > On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: >> On 2014年08月29日 03:47, Paul E. McKenney wrote: >>> Currently, the expedited grace-period primitives do get_online_cpus(). >>> This greatly simplifies their implementation, but means that

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Rafael J. Wysocki
On Thursday, September 18, 2014 05:38:45 AM Paul E. McKenney wrote: On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote: On 2014年09月17日 21:10, Paul E. McKenney wrote: On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: On 2014年08月29日 03:47, Paul E. McKenney wrote:

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Paul E. McKenney
On Fri, Sep 19, 2014 at 12:55:11AM +0200, Rafael J. Wysocki wrote: On Thursday, September 18, 2014 05:38:45 AM Paul E. McKenney wrote: On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote: On 2014年09月17日 21:10, Paul E. McKenney wrote: On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Lan Tianyu
On 2014年09月17日 21:10, Paul E. McKenney wrote: On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: On 2014年08月29日 03:47, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-18 Thread Paul E. McKenney
On Thu, Sep 18, 2014 at 03:15:36PM +0800, Lan Tianyu wrote: On 2014年09月17日 21:10, Paul E. McKenney wrote: On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: On 2014年08月29日 03:47, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-17 Thread Paul E. McKenney
On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: > On 2014年08月29日 03:47, Paul E. McKenney wrote: > > Currently, the expedited grace-period primitives do get_online_cpus(). > > This greatly simplifies their implementation, but means that calls to > > them holding locks that are acquired

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-17 Thread Lan Tianyu
On 2014年08月29日 03:47, Paul E. McKenney wrote: > Currently, the expedited grace-period primitives do get_online_cpus(). > This greatly simplifies their implementation, but means that calls to > them holding locks that are acquired by CPU-hotplug notifiers (to say > nothing of calls to these

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-17 Thread Lan Tianyu
On 2014年08月29日 03:47, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to them holding locks that are acquired by CPU-hotplug notifiers (to say nothing of calls to these primitives

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-17 Thread Paul E. McKenney
On Wed, Sep 17, 2014 at 03:11:42PM +0800, Lan Tianyu wrote: On 2014年08月29日 03:47, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to them holding locks that are acquired by

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Paul E. McKenney
On Wed, Sep 03, 2014 at 05:28:50PM +0200, Peter Zijlstra wrote: > On Wed, Sep 03, 2014 at 08:03:06AM -0700, Paul E. McKenney wrote: > > > > Normal RCU grace periods avoid this by synchronizing on a lock acquired > > > > by > > > > the RCU CPU-hotplug notifiers, but this does not work for the

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Peter Zijlstra
On Wed, Sep 03, 2014 at 08:03:06AM -0700, Paul E. McKenney wrote: > > > Normal RCU grace periods avoid this by synchronizing on a lock acquired by > > > the RCU CPU-hotplug notifiers, but this does not work for the expedited > > > grace periods because the outgoing CPU can be running random tasks

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Paul E. McKenney
On Wed, Sep 03, 2014 at 01:31:12PM +0200, Peter Zijlstra wrote: > On Tue, Sep 02, 2014 at 09:36:56AM -0700, Paul E. McKenney wrote: > > On Mon, Sep 01, 2014 at 06:17:35PM +0200, Peter Zijlstra wrote: > > > On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: > > > > > URGH.. I really

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Peter Zijlstra
On Tue, Sep 02, 2014 at 09:36:56AM -0700, Paul E. McKenney wrote: > On Mon, Sep 01, 2014 at 06:17:35PM +0200, Peter Zijlstra wrote: > > On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: > > > > URGH.. I really hate that. The hotplug interface is already too > > > > horrible, we

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Peter Zijlstra
On Tue, Sep 02, 2014 at 09:36:56AM -0700, Paul E. McKenney wrote: On Mon, Sep 01, 2014 at 06:17:35PM +0200, Peter Zijlstra wrote: On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: URGH.. I really hate that. The hotplug interface is already too horrible, we should not add

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Paul E. McKenney
On Wed, Sep 03, 2014 at 01:31:12PM +0200, Peter Zijlstra wrote: On Tue, Sep 02, 2014 at 09:36:56AM -0700, Paul E. McKenney wrote: On Mon, Sep 01, 2014 at 06:17:35PM +0200, Peter Zijlstra wrote: On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: URGH.. I really hate that.

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Peter Zijlstra
On Wed, Sep 03, 2014 at 08:03:06AM -0700, Paul E. McKenney wrote: Normal RCU grace periods avoid this by synchronizing on a lock acquired by the RCU CPU-hotplug notifiers, but this does not work for the expedited grace periods because the outgoing CPU can be running random tasks for

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-03 Thread Paul E. McKenney
On Wed, Sep 03, 2014 at 05:28:50PM +0200, Peter Zijlstra wrote: On Wed, Sep 03, 2014 at 08:03:06AM -0700, Paul E. McKenney wrote: Normal RCU grace periods avoid this by synchronizing on a lock acquired by the RCU CPU-hotplug notifiers, but this does not work for the expedited

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-02 Thread Paul E. McKenney
On Mon, Sep 01, 2014 at 06:17:35PM +0200, Peter Zijlstra wrote: > On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: > > > URGH.. I really hate that. The hotplug interface is already too > > > horrible, we should not add such hacks to it. > > > > We do have try_ interfaces to a

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-02 Thread Paul E. McKenney
On Mon, Sep 01, 2014 at 06:17:35PM +0200, Peter Zijlstra wrote: On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: URGH.. I really hate that. The hotplug interface is already too horrible, we should not add such hacks to it. We do have try_ interfaces to a number of

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-01 Thread Peter Zijlstra
On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: > > URGH.. I really hate that. The hotplug interface is already too > > horrible, we should not add such hacks to it. > > We do have try_ interfaces to a number of other subsystems, so I don't > believe that it qualifies as such a

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-01 Thread Paul E. McKenney
On Mon, Sep 01, 2014 at 01:20:59PM +0200, Peter Zijlstra wrote: > On Thu, Aug 28, 2014 at 12:47:45PM -0700, Paul E. McKenney wrote: > > Currently, the expedited grace-period primitives do get_online_cpus(). > > This greatly simplifies their implementation, but means that calls to > > them holding

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-01 Thread Peter Zijlstra
On Thu, Aug 28, 2014 at 12:47:45PM -0700, Paul E. McKenney wrote: > Currently, the expedited grace-period primitives do get_online_cpus(). > This greatly simplifies their implementation, but means that calls to > them holding locks that are acquired by CPU-hotplug notifiers (to say > nothing of

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-01 Thread Peter Zijlstra
On Thu, Aug 28, 2014 at 12:47:45PM -0700, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to them holding locks that are acquired by CPU-hotplug notifiers (to say nothing of calls

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-01 Thread Paul E. McKenney
On Mon, Sep 01, 2014 at 01:20:59PM +0200, Peter Zijlstra wrote: On Thu, Aug 28, 2014 at 12:47:45PM -0700, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to them holding locks

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-09-01 Thread Peter Zijlstra
On Mon, Sep 01, 2014 at 09:05:50AM -0700, Paul E. McKenney wrote: URGH.. I really hate that. The hotplug interface is already too horrible, we should not add such hacks to it. We do have try_ interfaces to a number of other subsystems, so I don't believe that it qualifies as such a hack.

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-08-29 Thread Paul E. McKenney
On Fri, Aug 29, 2014 at 02:54:54PM +0800, Lan Tianyu wrote: > On 2014年08月29日 03:47, Paul E. McKenney wrote: > > Currently, the expedited grace-period primitives do get_online_cpus(). > > This greatly simplifies their implementation, but means that calls to > > them holding locks that are acquired

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-08-29 Thread Lan Tianyu
On 2014年08月29日 03:47, Paul E. McKenney wrote: > Currently, the expedited grace-period primitives do get_online_cpus(). > This greatly simplifies their implementation, but means that calls to > them holding locks that are acquired by CPU-hotplug notifiers (to say > nothing of calls to these

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-08-29 Thread Lan Tianyu
On 2014年08月29日 03:47, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to them holding locks that are acquired by CPU-hotplug notifiers (to say nothing of calls to these primitives

Re: [PATCH RFC tip/core/rcu] Eliminate deadlock between CPU hotplug and expedited grace periods

2014-08-29 Thread Paul E. McKenney
On Fri, Aug 29, 2014 at 02:54:54PM +0800, Lan Tianyu wrote: On 2014年08月29日 03:47, Paul E. McKenney wrote: Currently, the expedited grace-period primitives do get_online_cpus(). This greatly simplifies their implementation, but means that calls to them holding locks that are acquired by