public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>, Tejun Heo <tj@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] locking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem
Date: Wed, 24 Apr 2019 11:34:59 -0700	[thread overview]
Message-ID: <20190424183459.GO3923@linux.ibm.com> (raw)
In-Reply-To: <20190424110256.GA86120@gmail.com>

On Wed, Apr 24, 2019 at 01:02:56PM +0200, Ingo Molnar wrote:
> 
> * Oleg Nesterov <oleg@redhat.com> wrote:
> 
> > On 04/24, Ingo Molnar wrote:
> > >
> > > > -#define DEFINE_STATIC_PERCPU_RWSEM(name)				\
> > > > +#define __DEFINE_PERCPU_RWSEM(name, is_static)				\
> > > >  static DEFINE_PER_CPU(unsigned int, __percpu_rwsem_rc_##name);		\
> > > > -static struct percpu_rw_semaphore name = {				\
> > > > +is_static struct percpu_rw_semaphore name = {				\
> > > >  	.rss = __RCU_SYNC_INITIALIZER(name.rss),			\
> > > >  	.read_count = &__percpu_rwsem_rc_##name,			\
> > > >  	.rw_sem = __RWSEM_INITIALIZER(name.rw_sem),			\
> > > >  	.writer = __RCUWAIT_INITIALIZER(name.writer),			\
> > > >  }
> > > > +#define DEFINE_PERCPU_RWSEM(name)		\
> > > > +	__DEFINE_PERCPU_RWSEM(name, /* not static */)
> > > > +#define DEFINE_STATIC_PERCPU_RWSEM(name)	\
> > > > +	__DEFINE_PERCPU_RWSEM(name, static)
> > >
> > > Which tree is this against? It doesn't apply to tip:master nor latest
> > 
> > OOPS, sorry Ingo!
> > 
> > I forgot that the change above depends on another cleanup I sent to Paul,
> > 
> > 	[PATCH] rcu/sync: kill rcu_sync_type/gp_type
> > 	https://lore.kernel.org/lkml/20190423120724.GA6132@redhat.com/
> > 
> > which does
> > 
> > 	-       .rss = __RCU_SYNC_INITIALIZER(name.rss, RCU_SCHED_SYNC),        \
> > 	+       .rss = __RCU_SYNC_INITIALIZER(name.rss),                        \
> > 
> > so lets forget it for now, or may be Paul can take this patch too.
> 
> No problem, and both rwsem patches you sent seem fine to me:
> 
> Reviewed-by: Ingo Molnar <mingo@kernel.org>

I queued patches with Ingo's reviewed-by.  Thank you both!

							Thanx, Paul


      reply	other threads:[~2019-04-24 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 16:32 [PATCH] locking/percpu-rwsem: Add DEFINE_PERCPU_RWSEM(), use it to initialize cgroup_threadgroup_rwsem Oleg Nesterov
2019-04-24 10:31 ` Ingo Molnar
2019-04-24 11:00   ` Oleg Nesterov
2019-04-24 11:02     ` Ingo Molnar
2019-04-24 18:34       ` Paul E. McKenney [this message]

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=20190424183459.GO3923@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tj@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