lkml.org 
[lkml]   [2018]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH tip/core/rcu 18/27] rcu: Add comment to the last sleep in the rcu tasks loop
    Date
    From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

    At the end of rcu_tasks_kthread() there's a lonely
    schedule_timeout_uninterruptible() call with no apparent rationale for
    its existence. But there is. It is to keep the thread from going into
    a tight loop if there's some anomaly. That really needs a comment.

    Link: http://lkml.kernel.org/r/20180524223839.GU3803@linux.vnet.ibm.com
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    ---
    kernel/rcu/update.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
    index 4c7c49c106ee..39cb23d22109 100644
    --- a/kernel/rcu/update.c
    +++ b/kernel/rcu/update.c
    @@ -814,6 +814,7 @@ static int __noreturn rcu_tasks_kthread(void *arg)
    list = next;
    cond_resched();
    }
    + /* Paranoid sleep to keep this from entering a tight loop */
    schedule_timeout_uninterruptible(HZ/10);
    }
    }
    --
    2.17.1
    \
     
     \ /
      Last update: 2018-06-26 02:34    [W:2.844 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site