Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674194

Re: PM / wakeirq: Convert to SRCU

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: PM / wakeirq: Convert to SRCU
Date 2017-06-25 11:20 +0200
Message-ID <tWbS1-3df-11@gated-at.bofh.it> (permalink)
References <tVQ1c-6d5-13@gated-at.bofh.it> <tVTLs-8uO-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PM / wakeirq: Convert to SRCU Thomas Gleixner <tglx@linutronix.de> - 2017-06-24 12:00 +0200
  Re: PM / wakeirq: Convert to SRCU "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-24 14:10 +0200
    Re: PM / wakeirq: Convert to SRCU Thomas Gleixner <tglx@linutronix.de> - 2017-06-24 14:20 +0200
      Re: PM / wakeirq: Convert to SRCU "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-24 14:40 +0200
  Re: PM / wakeirq: Convert to SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-24 16:00 +0200
    Re: PM / wakeirq: Convert to SRCU Thomas Gleixner <tglx@linutronix.de> - 2017-06-25 11:20 +0200
      Re: PM / wakeirq: Convert to SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-25 16:50 +0200
        [PATCH v2]  PM / wakeirq: Convert to SRCU Thomas Gleixner <tglx@linutronix.de> - 2017-06-25 19:40 +0200
          Re: [PATCH v2]  PM / wakeirq: Convert to SRCU "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-06-25 20:30 +0200
            Re: [PATCH v2]  PM / wakeirq: Convert to SRCU Tony Lindgren <tony@atomide.com> - 2017-06-26 12:20 +0200
          Re: [PATCH v2]  PM / wakeirq: Convert to SRCU Brian Norris <briannorris@chromium.org> - 2017-06-26 22:40 +0200
            Re: [PATCH v2]  PM / wakeirq: Convert to SRCU "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-06-28 23:10 +0200

csiph-web