Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-27 Thread Paul E. McKenney
On Fri, Jul 25, 2014 at 07:29:37PM -0400, Pranith Kumar wrote: > > On 07/25/2014 07:15 PM, Paul E. McKenney wrote: > > On Fri, Jul 25, 2014 at 06:23:41PM -0400, Pranith Kumar wrote: > >> Here total is the total number of times we enter th function > >> rcu_report_qs_rsp() > >> and unnecessary is

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-27 Thread Paul E. McKenney
On Sun, Jul 27, 2014 at 12:44:30PM -0400, Pranith Kumar wrote: > On Sun, Jul 27, 2014 at 12:29 PM, Paul E. McKenney > wrote: > > On Sun, Jul 27, 2014 at 11:55:38AM -0400, Pranith Kumar wrote: > >> Hi Paul, > >> > >> On Fri, Jul 25, 2014 at 6:47 PM, Paul E. McKenney > >> wrote: > >> > On Fri, Jul

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-27 Thread Pranith Kumar
On Sun, Jul 27, 2014 at 12:29 PM, Paul E. McKenney wrote: > On Sun, Jul 27, 2014 at 11:55:38AM -0400, Pranith Kumar wrote: >> Hi Paul, >> >> On Fri, Jul 25, 2014 at 6:47 PM, Paul E. McKenney >> wrote: >> > On Fri, Jul 25, 2014 at 04:19:43PM -0400, Pranith Kumar wrote: >> >> >> >> I checked all th

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-27 Thread Paul E. McKenney
On Sun, Jul 27, 2014 at 11:55:38AM -0400, Pranith Kumar wrote: > Hi Paul, > > On Fri, Jul 25, 2014 at 6:47 PM, Paul E. McKenney > wrote: > > On Fri, Jul 25, 2014 at 04:19:43PM -0400, Pranith Kumar wrote: > >> > >> I checked all the locations where gp_flags is being updated and the > >> root node

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-27 Thread Pranith Kumar
Hi Paul, On Fri, Jul 25, 2014 at 6:47 PM, Paul E. McKenney wrote: > On Fri, Jul 25, 2014 at 04:19:43PM -0400, Pranith Kumar wrote: >> >> I checked all the locations where gp_flags is being updated and the >> root node lock is held in all the cases. >> So I guess we can remove the comment too. > >

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Pranith Kumar
On 07/25/2014 07:15 PM, Paul E. McKenney wrote: > On Fri, Jul 25, 2014 at 06:23:41PM -0400, Pranith Kumar wrote: >> Here total is the total number of times we enter th function >> rcu_report_qs_rsp() >> and unnecessary is the times we call wake_up() unnecessarily. >> case1, 2, 3 are the cases I l

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Paul E. McKenney
On Fri, Jul 25, 2014 at 06:23:41PM -0400, Pranith Kumar wrote: > On Fri, Jul 25, 2014 at 11:02 AM, Paul E. McKenney > wrote: > > On Fri, Jul 25, 2014 at 02:24:34AM -0400, Pranith Kumar wrote: > >> On Fri, Jul 25, 2014 at 1:06 AM, Pranith Kumar > >> wrote: > >> > >> > > >> > In rcu_report_qs_rsp(

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Paul E. McKenney
On Fri, Jul 25, 2014 at 04:19:43PM -0400, Pranith Kumar wrote: > On Fri, Jul 25, 2014 at 10:44 AM, Paul E. McKenney > wrote: > > On Fri, Jul 25, 2014 at 01:06:58AM -0400, Pranith Kumar wrote: > >> The rcu_gp_kthread_wake() function checks for three conditions before > >> waking up > >> grace peri

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Pranith Kumar
On Fri, Jul 25, 2014 at 11:02 AM, Paul E. McKenney wrote: > On Fri, Jul 25, 2014 at 02:24:34AM -0400, Pranith Kumar wrote: >> On Fri, Jul 25, 2014 at 1:06 AM, Pranith Kumar wrote: >> >> > >> > In rcu_report_qs_rsp(), I added a pr_info() call testing if any of the >> > above >> > conditions is tr

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Pranith Kumar
On Fri, Jul 25, 2014 at 10:44 AM, Paul E. McKenney wrote: > On Fri, Jul 25, 2014 at 01:06:58AM -0400, Pranith Kumar wrote: >> The rcu_gp_kthread_wake() function checks for three conditions before waking >> up >> grace period kthreads: >> >> * Is the thread we are trying to wake up the current th

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Paul E. McKenney
On Fri, Jul 25, 2014 at 02:24:34AM -0400, Pranith Kumar wrote: > On Fri, Jul 25, 2014 at 1:06 AM, Pranith Kumar wrote: > > > > > In rcu_report_qs_rsp(), I added a pr_info() call testing if any of the above > > conditions is true, in which case we can avoid calling wake_up(). It turns > > out > >

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-25 Thread Paul E. McKenney
On Fri, Jul 25, 2014 at 01:06:58AM -0400, Pranith Kumar wrote: > The rcu_gp_kthread_wake() function checks for three conditions before waking > up > grace period kthreads: > > * Is the thread we are trying to wake up the current thread? > * Are the gp_flags zero? (all threads wait on non-zero g

Re: [RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-24 Thread Pranith Kumar
On Fri, Jul 25, 2014 at 1:06 AM, Pranith Kumar wrote: > > In rcu_report_qs_rsp(), I added a pr_info() call testing if any of the above > conditions is true, in which case we can avoid calling wake_up(). It turns out > that quite a few actually are. Most of the cases where we can avoid is > condi

[RFC PATCH 1/1] rcu: Use rcu_gp_kthread_wake() to wake up kthreads

2014-07-24 Thread Pranith Kumar
The rcu_gp_kthread_wake() function checks for three conditions before waking up grace period kthreads: * Is the thread we are trying to wake up the current thread? * Are the gp_flags zero? (all threads wait on non-zero gp_flags condition) * Is there no thread created for this flavour, hence not