linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Brian Norris <briannorris@chromium.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-rockchip@lists.infradead.org,
	Julia Cartwright <julia@ni.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-gpio@vger.kernel.org, John Keeping <john@metanate.com>,
	linux-pm@vger.kernel.org, Doug Anderson <dianders@chromium.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Tony Lindgren <tony@atomide.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: PM / wakeirq: Convert to SRCU
Date: Sun, 25 Jun 2017 07:45:59 -0700	[thread overview]
Message-ID: <20170625144559.GA3721@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1706251103320.1996@nanos>

On Sun, Jun 25, 2017 at 11:11:57AM +0200, Thomas Gleixner wrote:
> On Sat, 24 Jun 2017, Paul E. McKenney wrote:
> > On Sat, Jun 24, 2017 at 11:56:11AM +0200, Thomas Gleixner wrote:
> > >  static DECLARE_WAIT_QUEUE_HEAD(wakeup_count_wait_queue);
> > > 
> > > +static struct srcu_struct wakeup_srcu;
> > 
> > I suggest this to avoid the need for boot-time init_srcu_struct():
> > 
> > DEFINE_STATIC_SRCU(wakeup_srcu);
> 
> Now I know why I had this nagging feeling, that should stay away from
> computers yesterday morning.....

Believe me, I know that feeling well!

> > >  static struct wakeup_source deleted_ws = {
> > >  	.name = "deleted",
> > >  	.lock =  __SPIN_LOCK_UNLOCKED(deleted_ws.lock),
> > > @@ -198,7 +200,7 @@ void wakeup_source_remove(struct wakeup_
> > >  	spin_lock_irqsave(&events_lock, flags);
> > >  	list_del_rcu(&ws->entry);
> > >  	spin_unlock_irqrestore(&events_lock, flags);
> > > -	synchronize_rcu();
> > > +	synchronize_srcu(&wakeup_srcu);
> > >  }
> > >  EXPORT_SYMBOL_GPL(wakeup_source_remove);
> > 
> > The uses of RCU in device_wakeup_arm_wake_irqs() and
> > device_wakeup_disarm_wake_irqs() are unrelated and thus do not
> > need to be converted?  Or am I looking at the wrong version of
> > the kernel?  (Looking at f65013d655ac ("Merge branch 'for-linus' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace")
> > in Linus's tree.)
> 
> No, you are looking at the result of heat induced brain melt. Will send a
> proper one soon.

And if anything, I know that feeling even better.  Looking forward to
seeing the new patch.

							Thanx, Paul

  reply	other threads:[~2017-06-25 14:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24  9:56 PM / wakeirq: Convert to SRCU Thomas Gleixner
2017-06-24 12:02 ` Rafael J. Wysocki
2017-06-24 12:13   ` Thomas Gleixner
2017-06-24 12:30     ` Rafael J. Wysocki
2017-06-24 13:53 ` Paul E. McKenney
2017-06-25  9:11   ` Thomas Gleixner
2017-06-25 14:45     ` Paul E. McKenney [this message]
2017-06-25 17:31       ` [PATCH v2] " Thomas Gleixner
2017-06-25 18:29         ` Paul E. McKenney
2017-06-26 10:15           ` Tony Lindgren
2017-06-26 20:37         ` Brian Norris
2017-06-28 20:54           ` Rafael J. Wysocki

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=20170625144559.GA3721@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=john@metanate.com \
    --cc=julia@ni.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    /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).