Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-04 Thread Paul E. McKenney
On Wed, Apr 03, 2019 at 09:25:50AM -0700, Paul E. McKenney wrote: > On Wed, Apr 03, 2019 at 11:50:46AM +0200, Peter Zijlstra wrote: > > On Tue, Apr 02, 2019 at 06:18:53AM -0700, Paul E. McKenney wrote: > > > On Tue, Apr 02, 2019 at 09:09:53AM +0200, Peter Zijlstra wrote: > > > > On Mon, Apr 01,

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-03 Thread Paul E. McKenney
On Wed, Apr 03, 2019 at 11:50:46AM +0200, Peter Zijlstra wrote: > On Tue, Apr 02, 2019 at 06:18:53AM -0700, Paul E. McKenney wrote: > > On Tue, Apr 02, 2019 at 09:09:53AM +0200, Peter Zijlstra wrote: > > > On Mon, Apr 01, 2019 at 10:22:57AM -0700, Paul E. McKenney wrote: > > > > > Or am I missing

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-03 Thread Peter Zijlstra
On Tue, Apr 02, 2019 at 06:18:53AM -0700, Paul E. McKenney wrote: > On Tue, Apr 02, 2019 at 09:09:53AM +0200, Peter Zijlstra wrote: > > On Mon, Apr 01, 2019 at 10:22:57AM -0700, Paul E. McKenney wrote: > > > Or am I missing something that gets the scheduler on the job faster? > > > > Oh urgh,

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-02 Thread Paul E. McKenney
On Tue, Apr 02, 2019 at 09:09:53AM +0200, Peter Zijlstra wrote: > On Mon, Apr 01, 2019 at 10:22:57AM -0700, Paul E. McKenney wrote: > > > > The initial solution to this problem was to use set_tsk_need_resched() > > > > and > > > > set_preempt_need_resched() to force a future context switch, which

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-02 Thread Peter Zijlstra
On Mon, Apr 01, 2019 at 10:22:57AM -0700, Paul E. McKenney wrote: > > > The initial solution to this problem was to use set_tsk_need_resched() and > > > set_preempt_need_resched() to force a future context switch, which allows > > > rcu_preempt_note_context_switch() to report the deferred

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-01 Thread Paul E. McKenney
On Mon, Apr 01, 2019 at 10:22:57AM -0700, Paul E. McKenney wrote: > On Mon, Apr 01, 2019 at 10:32:11AM +0200, Peter Zijlstra wrote: > > On Fri, Mar 29, 2019 at 11:26:34AM -0700, Paul E. McKenney wrote: > > > When RCU core processing is offloaded from RCU_SOFTIRQ to the rcuc > > > kthreads, a full

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-01 Thread Paul E. McKenney
On Mon, Apr 01, 2019 at 10:32:11AM +0200, Peter Zijlstra wrote: > On Fri, Mar 29, 2019 at 11:26:34AM -0700, Paul E. McKenney wrote: > > When RCU core processing is offloaded from RCU_SOFTIRQ to the rcuc > > kthreads, a full and unconditional wakeup is required to initiate RCU > > core processing.

Re: [PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-04-01 Thread Peter Zijlstra
On Fri, Mar 29, 2019 at 11:26:34AM -0700, Paul E. McKenney wrote: > When RCU core processing is offloaded from RCU_SOFTIRQ to the rcuc > kthreads, a full and unconditional wakeup is required to initiate RCU > core processing. In contrast, when RCU core processing is carried > out by RCU_SOFTIRQ,

[PATCH tip/core/rcu 2/2] rcu: Check for wakeup-safe conditions in rcu_read_unlock_special()

2019-03-29 Thread Paul E. McKenney
When RCU core processing is offloaded from RCU_SOFTIRQ to the rcuc kthreads, a full and unconditional wakeup is required to initiate RCU core processing. In contrast, when RCU core processing is carried out by RCU_SOFTIRQ, a raise_softirq() suffices. Of course, there are situations where