RCU Archive mirror
 help / color / mirror / Atom feed
From: Z qiang <qiang.zhang1211@gmail.com>
To: paulmck@kernel.org
Cc: frederic@kernel.org, neeraj.upadhyay@kernel.org,
	joel@joelfernandes.org,  rcu@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu-tasks: Fix the comments for tasks_rcu_exit_srcu_stall_timer
Date: Tue, 27 Feb 2024 14:08:00 +0800	[thread overview]
Message-ID: <CALm+0cWESKy4xCg9Eg4-6OoxPcQ102F4TY5C80jgugrmM3ptFA@mail.gmail.com> (raw)
In-Reply-To: <ec57f86d-936c-4709-aeda-d9f57a8fd7aa@paulmck-laptop>

>
> 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
> > >

  reply	other threads:[~2024-02-27  6:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  3:24 [PATCH] rcu-tasks: Fix the comments for tasks_rcu_exit_srcu_stall_timer Zqiang
2024-02-26  3:28 ` Z qiang
2024-02-26 18:56   ` Paul E. McKenney
2024-02-27  6:08     ` Z qiang [this message]
2024-02-26 18:54 ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALm+0cWESKy4xCg9Eg4-6OoxPcQ102F4TY5C80jgugrmM3ptFA@mail.gmail.com \
    --to=qiang.zhang1211@gmail.com \
    --cc=frederic@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).