Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Paul E. McKenney
On Wed, Sep 12, 2012 at 02:41:36PM +0200, Peter Zijlstra wrote: > On Wed, 2012-09-12 at 14:06 +0200, Frederic Weisbecker wrote: > > > > 1) This can happen if something calls set_need_resched() while no other > > task is > > on the runqueue. > > People really shouldn't be doing that... I think I

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Wed, 2012-09-12 at 15:54 +0200, Frederic Weisbecker wrote: > On Wed, Sep 12, 2012 at 02:52:40PM +0200, Peter Zijlstra wrote: > > On Wed, 2012-09-12 at 14:41 +0200, Peter Zijlstra wrote: > > > > > We could of course mandate that all remote wakeups to special nohz cpus > > > get queued. That

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Frederic Weisbecker
On Wed, Sep 12, 2012 at 02:52:40PM +0200, Peter Zijlstra wrote: > On Wed, 2012-09-12 at 14:41 +0200, Peter Zijlstra wrote: > > > We could of course mandate that all remote wakeups to special nohz cpus > > get queued. That would just leave us with RCU and it would simply not > > send resched IPIs

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Frederic Weisbecker
On Wed, Sep 12, 2012 at 02:41:36PM +0200, Peter Zijlstra wrote: > On Wed, 2012-09-12 at 14:06 +0200, Frederic Weisbecker wrote: > > > > 1) This can happen if something calls set_need_resched() while no other > > task is > > on the runqueue. > > People really shouldn't be doing that... I think I

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Wed, 2012-09-12 at 14:41 +0200, Peter Zijlstra wrote: > We could of course mandate that all remote wakeups to special nohz cpus > get queued. That would just leave us with RCU and it would simply not > send resched IPIs to extended quiescent CPUs anyway, right? > > So at that point all return

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Wed, 2012-09-12 at 14:06 +0200, Frederic Weisbecker wrote: > > 1) This can happen if something calls set_need_resched() while no other task > is > on the runqueue. People really shouldn't be doing that... I think I know why RCU does this, but yuck. I also think RCU can avoid doing this, but

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Frederic Weisbecker
On Wed, Sep 12, 2012 at 11:33:33AM +0200, Peter Zijlstra wrote: > On Mon, 2012-09-10 at 22:26 +0200, Frederic Weisbecker wrote: > > > > > OK, so colour me unconvinced.. why are we doing this? > > > > > > > > Typically when we call schedule nr_running != 1 (we need current to be > > > > running

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Mon, 2012-09-10 at 22:26 +0200, Frederic Weisbecker wrote: > > > OK, so colour me unconvinced.. why are we doing this? > > > > > > Typically when we call schedule nr_running != 1 (we need current to be > > > running and a possible target to switch to). > > > > > > So I'd prefer to simply

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Mon, 2012-09-10 at 22:26 +0200, Frederic Weisbecker wrote: OK, so colour me unconvinced.. why are we doing this? Typically when we call schedule nr_running != 1 (we need current to be running and a possible target to switch to). So I'd prefer to simply have schedule()

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Frederic Weisbecker
On Wed, Sep 12, 2012 at 11:33:33AM +0200, Peter Zijlstra wrote: On Mon, 2012-09-10 at 22:26 +0200, Frederic Weisbecker wrote: OK, so colour me unconvinced.. why are we doing this? Typically when we call schedule nr_running != 1 (we need current to be running and a possible

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Wed, 2012-09-12 at 14:06 +0200, Frederic Weisbecker wrote: 1) This can happen if something calls set_need_resched() while no other task is on the runqueue. People really shouldn't be doing that... I think I know why RCU does this, but yuck. I also think RCU can avoid doing this, but its

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Wed, 2012-09-12 at 14:41 +0200, Peter Zijlstra wrote: We could of course mandate that all remote wakeups to special nohz cpus get queued. That would just leave us with RCU and it would simply not send resched IPIs to extended quiescent CPUs anyway, right? So at that point all return to

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Frederic Weisbecker
On Wed, Sep 12, 2012 at 02:41:36PM +0200, Peter Zijlstra wrote: On Wed, 2012-09-12 at 14:06 +0200, Frederic Weisbecker wrote: 1) This can happen if something calls set_need_resched() while no other task is on the runqueue. People really shouldn't be doing that... I think I know why

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Frederic Weisbecker
On Wed, Sep 12, 2012 at 02:52:40PM +0200, Peter Zijlstra wrote: On Wed, 2012-09-12 at 14:41 +0200, Peter Zijlstra wrote: We could of course mandate that all remote wakeups to special nohz cpus get queued. That would just leave us with RCU and it would simply not send resched IPIs to

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Peter Zijlstra
On Wed, 2012-09-12 at 15:54 +0200, Frederic Weisbecker wrote: On Wed, Sep 12, 2012 at 02:52:40PM +0200, Peter Zijlstra wrote: On Wed, 2012-09-12 at 14:41 +0200, Peter Zijlstra wrote: We could of course mandate that all remote wakeups to special nohz cpus get queued. That would just

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-12 Thread Paul E. McKenney
On Wed, Sep 12, 2012 at 02:41:36PM +0200, Peter Zijlstra wrote: On Wed, 2012-09-12 at 14:06 +0200, Frederic Weisbecker wrote: 1) This can happen if something calls set_need_resched() while no other task is on the runqueue. People really shouldn't be doing that... I think I know why

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-10 Thread Frederic Weisbecker
On Thu, Sep 06, 2012 at 07:13:11PM +0200, Peter Zijlstra wrote: > On Thu, 2012-09-06 at 19:02 +0200, Peter Zijlstra wrote: > > On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: > > > From: Frederic Weisbecker > > > > > > When exceptions or irq are about to resume userspace, if > > > the

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-10 Thread Frederic Weisbecker
On Thu, Sep 06, 2012 at 07:13:11PM +0200, Peter Zijlstra wrote: On Thu, 2012-09-06 at 19:02 +0200, Peter Zijlstra wrote: On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: From: Frederic Weisbecker fweis...@gmail.com When exceptions or irq are about to resume userspace, if

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-06 Thread Peter Zijlstra
On Thu, 2012-09-06 at 19:02 +0200, Peter Zijlstra wrote: > On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: > > From: Frederic Weisbecker > > > > When exceptions or irq are about to resume userspace, if > > the task needs to be rescheduled, the arch low level code > > calls schedule()

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-06 Thread Peter Zijlstra
On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: > From: Frederic Weisbecker > > When exceptions or irq are about to resume userspace, if > the task needs to be rescheduled, the arch low level code > calls schedule() directly. > > At that time we may be in extended quiescent state

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-06 Thread Peter Zijlstra
On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: From: Frederic Weisbecker fweis...@gmail.com When exceptions or irq are about to resume userspace, if the task needs to be rescheduled, the arch low level code calls schedule() directly. At that time we may be in extended

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-09-06 Thread Peter Zijlstra
On Thu, 2012-09-06 at 19:02 +0200, Peter Zijlstra wrote: On Thu, 2012-08-30 at 14:05 -0700, Paul E. McKenney wrote: From: Frederic Weisbecker fweis...@gmail.com When exceptions or irq are about to resume userspace, if the task needs to be rescheduled, the arch low level code calls

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-08-31 Thread Josh Triplett
On Thu, Aug 30, 2012 at 02:05:28PM -0700, Paul E. McKenney wrote: > From: Frederic Weisbecker > > When exceptions or irq are about to resume userspace, if > the task needs to be rescheduled, the arch low level code > calls schedule() directly. > > At that time we may be in extended quiescent

Re: [PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-08-31 Thread Josh Triplett
On Thu, Aug 30, 2012 at 02:05:28PM -0700, Paul E. McKenney wrote: From: Frederic Weisbecker fweis...@gmail.com When exceptions or irq are about to resume userspace, if the task needs to be rescheduled, the arch low level code calls schedule() directly. At that time we may be in extended

[PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-08-30 Thread Paul E. McKenney
From: Frederic Weisbecker When exceptions or irq are about to resume userspace, if the task needs to be rescheduled, the arch low level code calls schedule() directly. At that time we may be in extended quiescent state from RCU POV: the exception is not anymore protected inside rcu_user_exit()

[PATCH tip/core/rcu 11/26] rcu: Exit RCU extended QS on user preemption

2012-08-30 Thread Paul E. McKenney
From: Frederic Weisbecker fweis...@gmail.com When exceptions or irq are about to resume userspace, if the task needs to be rescheduled, the arch low level code calls schedule() directly. At that time we may be in extended quiescent state from RCU POV: the exception is not anymore protected