linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com,
	dipankar@in.ibm.com, akpm@linux-foundation.org,
	mathieu.desnoyers@efficios.com, josh@joshtriplett.org,
	tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org,
	dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com,
	oleg@redhat.com, Jules Irenge <jbi.octave@gmail.com>
Subject: Re: [PATCH tip/core/rcu 2/3] rcu: Add missing annotation for exit_tasks_rcu_start()
Date: Mon, 17 Feb 2020 15:10:45 -0800	[thread overview]
Message-ID: <20200217231045.GA2935@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <20200217144452.GA145700@google.com>

On Mon, Feb 17, 2020 at 09:44:52AM -0500, Joel Fernandes wrote:
> On Fri, Feb 14, 2020 at 04:25:19PM -0800, paulmck@kernel.org wrote:
> > From: Jules Irenge <jbi.octave@gmail.com>
> > 
> > Sparse reports a warning at exit_tasks_rcu_start(void)
> > 
> > |warning: context imbalance in exit_tasks_rcu_start() - wrong count at exit
> > 
> > To fix this, this commit adds an __acquires(&tasks_rcu_exit_srcu).
> > Given that exit_tasks_rcu_start() does actually call __srcu_read_lock(),
> > this not only fixes the warning but also improves on the readability of
> > the code.
> 
> For patch 1/3 and 2/3:
> 
> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>

Applied, thank you!

> Though IMO it would be good to squash both the patches.

Fair point, but I will leave them be.  ;-)

							Thanx, Paul

> thanks,
> 
>  - Joel
> 
> 
> > Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > ---
> >  kernel/rcu/update.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
> > index a27df76..a04fe54 100644
> > --- a/kernel/rcu/update.c
> > +++ b/kernel/rcu/update.c
> > @@ -801,7 +801,7 @@ static int __init rcu_spawn_tasks_kthread(void)
> >  core_initcall(rcu_spawn_tasks_kthread);
> >  
> >  /* Do the srcu_read_lock() for the above synchronize_srcu().  */
> > -void exit_tasks_rcu_start(void)
> > +void exit_tasks_rcu_start(void) __acquires(&tasks_rcu_exit_srcu)
> >  {
> >  	preempt_disable();
> >  	current->rcu_tasks_idx = __srcu_read_lock(&tasks_rcu_exit_srcu);
> > -- 
> > 2.9.5
> > 

  reply	other threads:[~2020-02-17 23:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15  0:24 [PATCH tip/core/rcu 0/3] Tasks-RCU updates for v5.7 Paul E. McKenney
2020-02-15  0:25 ` [PATCH tip/core/rcu 1/3] rcu-tasks: *_ONCE() for rcu_tasks_cbs_head paulmck
2020-02-17 12:38   ` Peter Zijlstra
2020-02-17 18:16     ` Paul E. McKenney
2020-02-18  7:56       ` Peter Zijlstra
2020-02-18 16:27         ` Paul E. McKenney
2020-02-18 20:11           ` Peter Zijlstra
2020-02-18 20:22             ` Paul E. McKenney
2020-02-18 22:45               ` Steven Rostedt
2020-02-18 22:54                 ` Paul E. McKenney
2020-02-18 23:13                   ` Steven Rostedt
2020-02-18 23:54                     ` Paul E. McKenney
2020-02-19  0:01                   ` Joel Fernandes
2020-02-19  0:16                     ` Paul E. McKenney
2020-02-19  1:13                       ` Joel Fernandes
2020-02-19  1:48                         ` Paul E. McKenney
2020-02-17 18:23     ` Joel Fernandes
2020-02-17 18:38       ` Marco Elver
2020-02-17 19:32         ` Joel Fernandes
2020-02-15  0:25 ` [PATCH tip/core/rcu 2/3] rcu: Add missing annotation for exit_tasks_rcu_start() paulmck
2020-02-17 14:44   ` Joel Fernandes
2020-02-17 23:10     ` Paul E. McKenney [this message]
2020-02-15  0:25 ` [PATCH tip/core/rcu 3/3] rcu: Add missing annotation for exit_tasks_rcu_finish() paulmck

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=20200217231045.GA2935@paulmck-ThinkPad-P72 \
    --to=paulmck@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jbi.octave@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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 NNTP newsgroup(s).