diff mbox series

rcu-tasks: Fix the comments for tasks_rcu_exit_srcu_stall_timer

Message ID 20240226032439.26359-1-qiang.zhang1211@gmail.com (mailing list archive)
State Accepted
Commit 043fc92b0161c2a0d7887b1d66dde85c1ae7dd6c
Headers show
Series rcu-tasks: Fix the comments for tasks_rcu_exit_srcu_stall_timer | expand

Commit Message

Zqiang Feb. 26, 2024, 3:24 a.m. UTC
The synchronize_srcu() has been removed by commit("rcu-tasks: Eliminate
deadlocks involving do_exit() and RCU tasks") in rcu_tasks_postscan.
This commit therefore fix the comments of tasks_rcu_exit_srcu_stall_timer.

Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
---
 kernel/rcu/tasks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zqiang Feb. 26, 2024, 3:28 a.m. UTC | #1
>
> The synchronize_srcu() has been removed by commit("rcu-tasks: Eliminate
> deadlocks involving do_exit() and RCU tasks") in rcu_tasks_postscan.
> This commit therefore fix the comments of tasks_rcu_exit_srcu_stall_timer.
>
> Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
> ---
>  kernel/rcu/tasks.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
> index 78d74c81cc24..d5319bbe8c98 100644
> --- a/kernel/rcu/tasks.h
> +++ b/kernel/rcu/tasks.h
> @@ -150,7 +150,7 @@ static struct rcu_tasks rt_name =                                                   \
>
>  #ifdef CONFIG_TASKS_RCU
>
> -/* Report delay in synchronize_srcu() completion in rcu_tasks_postscan(). */
> +/* Report delay of scan exiting tasklist in rcu_tasks_postscan(). */
>  static void tasks_rcu_exit_srcu_stall(struct timer_list *unused);
>  static DEFINE_TIMER(tasks_rcu_exit_srcu_stall_timer, tasks_rcu_exit_srcu_stall);

Is this timer not necessary? any thoughts?

Thanks
Zqiang


>  #endif
> --
> 2.17.1
>
Paul E. McKenney Feb. 26, 2024, 6:54 p.m. UTC | #2
On Mon, Feb 26, 2024 at 11:24:39AM +0800, Zqiang wrote:
> The synchronize_srcu() has been removed by commit("rcu-tasks: Eliminate
> deadlocks involving do_exit() and RCU tasks") in rcu_tasks_postscan.
> This commit therefore fix the comments of tasks_rcu_exit_srcu_stall_timer.
> 
> Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>

Queued, most likely for the v6.10 merge window, thank you!

							Thanx, Paul

> ---
>  kernel/rcu/tasks.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
> index 78d74c81cc24..d5319bbe8c98 100644
> --- a/kernel/rcu/tasks.h
> +++ b/kernel/rcu/tasks.h
> @@ -150,7 +150,7 @@ static struct rcu_tasks rt_name =							\
>  
>  #ifdef CONFIG_TASKS_RCU
>  
> -/* Report delay in synchronize_srcu() completion in rcu_tasks_postscan(). */
> +/* Report delay of scan exiting tasklist in rcu_tasks_postscan(). */
>  static void tasks_rcu_exit_srcu_stall(struct timer_list *unused);
>  static DEFINE_TIMER(tasks_rcu_exit_srcu_stall_timer, tasks_rcu_exit_srcu_stall);
>  #endif
> -- 
> 2.17.1
>
Paul E. McKenney Feb. 26, 2024, 6:56 p.m. UTC | #3
On Mon, Feb 26, 2024 at 11:28:57AM +0800, Z qiang wrote:
> >
> > The synchronize_srcu() has been removed by commit("rcu-tasks: Eliminate
> > deadlocks involving do_exit() and RCU tasks") in rcu_tasks_postscan.
> > This commit therefore fix the comments of tasks_rcu_exit_srcu_stall_timer.
> >
> > Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
> > ---
> >  kernel/rcu/tasks.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
> > index 78d74c81cc24..d5319bbe8c98 100644
> > --- a/kernel/rcu/tasks.h
> > +++ b/kernel/rcu/tasks.h
> > @@ -150,7 +150,7 @@ static struct rcu_tasks rt_name =                                                   \
> >
> >  #ifdef CONFIG_TASKS_RCU
> >
> > -/* Report delay in synchronize_srcu() completion in rcu_tasks_postscan(). */
> > +/* Report delay of scan exiting tasklist in rcu_tasks_postscan(). */
> >  static void tasks_rcu_exit_srcu_stall(struct timer_list *unused);
> >  static DEFINE_TIMER(tasks_rcu_exit_srcu_stall_timer, tasks_rcu_exit_srcu_stall);
> 
> Is this timer not necessary? any thoughts?

We have preemption points in the list traversals, and things like mutex
contention on the do_exit() path could result in extremely long lists,
so I believe we do need the timer.

But what did you have in mind?

							Thanx, Paul

> Thanks
> Zqiang
> 
> 
> >  #endif
> > --
> > 2.17.1
> >
Zqiang Feb. 27, 2024, 6:08 a.m. UTC | #4
>
> On Mon, Feb 26, 2024 at 11:28:57AM +0800, Z qiang wrote:
> > >
> > > The synchronize_srcu() has been removed by commit("rcu-tasks: Eliminate
> > > deadlocks involving do_exit() and RCU tasks") in rcu_tasks_postscan.
> > > This commit therefore fix the comments of tasks_rcu_exit_srcu_stall_timer.
> > >
> > > Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
> > > ---
> > >  kernel/rcu/tasks.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
> > > index 78d74c81cc24..d5319bbe8c98 100644
> > > --- a/kernel/rcu/tasks.h
> > > +++ b/kernel/rcu/tasks.h
> > > @@ -150,7 +150,7 @@ static struct rcu_tasks rt_name =                                                   \
> > >
> > >  #ifdef CONFIG_TASKS_RCU
> > >
> > > -/* Report delay in synchronize_srcu() completion in rcu_tasks_postscan(). */
> > > +/* Report delay of scan exiting tasklist in rcu_tasks_postscan(). */
> > >  static void tasks_rcu_exit_srcu_stall(struct timer_list *unused);
> > >  static DEFINE_TIMER(tasks_rcu_exit_srcu_stall_timer, tasks_rcu_exit_srcu_stall);
> >
> > Is this timer not necessary? any thoughts?
>
> We have preemption points in the list traversals, and things like mutex
> contention on the do_exit() path could result in extremely long lists,
> so I believe we do need the timer.
>
> But what did you have in mind?

Thanks for the explanation,  I ignored the scenario where the
lists might be very long :)

Thanks
Zqiang

>
>                                                         Thanx, Paul
>
> > Thanks
> > Zqiang
> >
> >
> > >  #endif
> > > --
> > > 2.17.1
> > >
diff mbox series

Patch

diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h
index 78d74c81cc24..d5319bbe8c98 100644
--- a/kernel/rcu/tasks.h
+++ b/kernel/rcu/tasks.h
@@ -150,7 +150,7 @@  static struct rcu_tasks rt_name =							\
 
 #ifdef CONFIG_TASKS_RCU
 
-/* Report delay in synchronize_srcu() completion in rcu_tasks_postscan(). */
+/* Report delay of scan exiting tasklist in rcu_tasks_postscan(). */
 static void tasks_rcu_exit_srcu_stall(struct timer_list *unused);
 static DEFINE_TIMER(tasks_rcu_exit_srcu_stall_timer, tasks_rcu_exit_srcu_stall);
 #endif