lkml.org 
[lkml]   [2015]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC tip/core/rcu 5/5] rcu: Limit expedited helping to every 10 ms or every 4th GP
    On Tue, Jun 30, 2015 at 11:56:37PM +0200, Eric Dumazet wrote:
    > On Tue, Jun 30, 2015 at 11:48 PM, Paul E. McKenney
    > <paulmck@linux.vnet.ibm.com> wrote:
    > > From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
    > >
    > > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    > > ---
    > > kernel/rcu/tree.c | 15 ++++++++++++---
    > > 1 file changed, 12 insertions(+), 3 deletions(-)
    > >
    > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
    > > index 308b6acb4260..247aa1120c4c 100644
    > > --- a/kernel/rcu/tree.c
    > > +++ b/kernel/rcu/tree.c
    > > @@ -3505,10 +3505,19 @@ void synchronize_sched_expedited(void)
    > > !atomic_read(&rsp->expedited_need_qs));
    > >
    > > rcu_exp_gp_seq_end(rsp);
    > > - mutex_unlock(&rnp->exp_funnel_mutex);
    > > smp_mb(); /* ensure subsequent action seen after grace period. */
    > > - if (rsp->gp_kthread && rcu_gp_in_progress(rsp))
    > > - wake_up(&rsp->gp_wq);
    > > + if (rsp->gp_kthread && rcu_gp_in_progress(rsp)) {
    > > + static unsigned long nextgp;
    > > + static unsigned long nextjiffy;
    > > +
    > > + if (time_after_eq(jiffies, nextgp) ||
    > > + ULONG_CMP_GE(rsp->gpnum, nextgp)) {
    > > + nextgp = rsp->gpnum + 4;
    > > + nextjiffy = jiffies + 10;
    >
    > Do you want 10 ticks or 10 ms (as stated in title) ?

    Ten ticks, good catch!

    Thanx, Paul

    > > + wake_up(&rsp->gp_wq);
    > > + }
    > > + }
    > > + mutex_unlock(&rnp->exp_funnel_mutex);
    > >
    > > put_online_cpus();
    > > }
    > > --
    > > 1.8.1.5
    > >
    >



    \
     
     \ /
      Last update: 2015-07-01 00:41    [W:4.042 / U:1.776 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site