All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] rcu: uninline rcu_lock_acquire() and rcu_lock_release()
Date: Tue, 8 Jul 2014 15:22:11 -0700	[thread overview]
Message-ID: <20140708222211.GE4603@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140701164002.GA26950@redhat.com>

On Tue, Jul 01, 2014 at 06:40:02PM +0200, Oleg Nesterov wrote:
> On 07/01, Peter Zijlstra wrote:
> >
> > On Mon, Jun 30, 2014 at 06:18:49PM +0200, Oleg Nesterov wrote:
> > > +static inline void __rcu_lock_acquire(struct lockdep_map *map, unsigned long ip)
> > >  {
> > > +	lock_acquire(map, 0, 0, 2, 0, NULL, ip);
> > >  }
> >
> > > +extern void rcu_lock_acquire(void);
> > > +extern void rcu_lock_release(void);
> > > +extern void rcu_lock_acquire_bh(void);
> > > +extern void rcu_lock_release_bh(void);
> > > +extern void rcu_lock_acquire_sched(void);
> > > +extern void rcu_lock_release_sched(void);
> >
> > > diff --git a/include/linux/srcu.h b/include/linux/srcu.h
> > > index a2783cb..5c06289 100644
> > > --- a/include/linux/srcu.h
> > > +++ b/include/linux/srcu.h
> > > @@ -219,7 +219,7 @@ static inline int srcu_read_lock(struct srcu_struct *sp) __acquires(sp)
> > >  {
> > >  	int retval = __srcu_read_lock(sp);
> > >
> > > -	rcu_lock_acquire(&(sp)->dep_map);
> > > +	__rcu_lock_acquire(&(sp)->dep_map, _THIS_IP_);
> > >  	return retval;
> > >  }
> >
> > Would an srcu_lock_acquire() not make sense here?
> >
> > In any case, not wrong per se, just a consistency thing that stood out.
> 
> Yes, I looked at this too...
> 
> But probably it would be better to just add __rcu_lock_acquire() into
> __srcu_read_lock(), and kill that inline in srcu.h ?

Makes sense to me!

							Thanx, Paul


  reply	other threads:[~2014-07-08 22:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 16:18 [PATCH v4 0/2] rcu: uninline rcu_lock_acquire() and rcu_lock_release() Oleg Nesterov
2014-06-30 16:18 ` [PATCH v4 1/2] " Oleg Nesterov
2014-07-01 11:41   ` Peter Zijlstra
2014-07-01 16:40     ` Oleg Nesterov
2014-07-08 22:22       ` Paul E. McKenney [this message]
2014-06-30 16:18 ` [PATCH v4 2/2] rcu: change rcu_dereference_check(c) to check "c" first Oleg Nesterov
2014-06-30 20:24 ` [PATCH v4 0/2] rcu: uninline rcu_lock_acquire() and rcu_lock_release() Paul E. McKenney
2014-07-01 14:55   ` Oleg Nesterov
2014-07-02 15:39     ` Oleg Nesterov
2014-07-02 18:59       ` [PATCH 0/1] rcu: uninline rcu_read_lock_held() Oleg Nesterov
2014-07-02 18:59         ` [PATCH 1/1] " Oleg Nesterov
2014-07-08 22:20           ` 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=20140708222211.GE4603@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=josh@joshtriplett.org \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.