From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: paulmck@linux.vnet.ibm.com
Cc: Simon Glass <sjg@chromium.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
LKML <linux-kernel@vger.kernel.org>,
"Greg Kroah-Hartman" <gregkh@suse.de>,
linux-serial@vger.kernel.org
Subject: Re: [PATCH 3/3] serial: 8250: Add a wakeup_capable module param
Date: Mon, 23 Jan 2012 22:04:35 +0100 [thread overview]
Message-ID: <201201232204.35738.rjw@sisk.pl> (raw)
In-Reply-To: <20120123164511.GE2434@linux.vnet.ibm.com>
On Monday, January 23, 2012, Paul E. McKenney wrote:
> On Sat, Jan 21, 2012 at 12:49:35AM +0100, Rafael J. Wysocki wrote:
> > On Friday, January 20, 2012, Paul E. McKenney wrote:
> > > On Fri, Jan 20, 2012 at 01:03:34AM +0100, Rafael J. Wysocki wrote:
> > > > On Thursday, January 19, 2012, Paul E. McKenney wrote:
> > > > > On Thu, Jan 19, 2012 at 01:02:58AM +0100, Rafael J. Wysocki wrote:
> > > > > > On Wednesday, January 18, 2012, Paul E. McKenney wrote:
> > > > > > > On Wed, Jan 18, 2012 at 02:15:59PM -0800, Simon Glass wrote:
> > > > [...]
> > > > > > Yes, you can, but then I'd say it's not necessary for user space to
> > > > > > be able to carry that out in a tight loop. So, it seems, alternatively,
> > > > > > we could make that loop a bit less tight, e.g. by adding an arbitrary
> > > > > > sleep to the user space interface for the "disable" case.
> > > > >
> > > > > Good point, that would work just as well and be simpler.
> > > >
> > > > Thanks for the confirmation! :-)
> > > >
> > > > By the way, I wonder, would it help to add synchronize_rcu() to
> > > > wakeup_source_add() too? Then, even if device_wakeup_enable() and
> > > > device_wakeup_disable() are executed in a tight loop for the same
> > > > device, the list_add/list_del operations will always happen in
> > > > different RCU cycles (or at least it seems so).
> > >
> > > I cannot immediately see how adding a synchronize_rcu() to
> > > wakeup_source_add() would help anything. You only need to wait for a
> > > grace period on removal, not (normally) on addition. The single grace
> > > period during removal will catch up all other asynchronous RCU grace
> > > period requests on that CPU.
> > >
> > > Or am I missing your point?
> >
> > Well, I was thinking about the failure scenario you mentioned where
> > executing enable/disable in a tight loop might exhaust system memory
> > (if I understood it correctly).
>
> Ah, got it. If they are executing this in a tight loop, there will be
> little difference between doing one synchronize_rcu() per pass through
> the loop or doing two. So we should be just fine with the single instance
> of synchronize_rcu() per loop.
Good! :-)
Thanks a lot,
Rafael
next prev parent reply other threads:[~2012-01-23 21:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-17 18:56 [PATCH 1/3] serial: 8250: Remove trailing space in 8250 driver Simon Glass
2012-01-17 18:56 ` [PATCH 2/3] serial: Make wakeup_capable a flag to reduce boot time Simon Glass
2012-01-17 20:09 ` Alan Cox
2012-01-17 18:56 ` [PATCH 3/3] serial: 8250: Add a wakeup_capable module param Simon Glass
2012-01-17 20:10 ` Alan Cox
2012-01-18 4:17 ` Paul E. McKenney
2012-01-18 21:08 ` Simon Glass
2012-01-18 21:42 ` Paul E. McKenney
2012-01-18 22:15 ` Simon Glass
2012-01-18 22:43 ` Paul E. McKenney
2012-01-18 22:51 ` Simon Glass
2012-01-19 0:02 ` Rafael J. Wysocki
2012-01-19 1:37 ` Paul E. McKenney
2012-01-19 2:35 ` Simon Glass
2012-01-19 19:13 ` Paul E. McKenney
2012-01-20 0:03 ` Rafael J. Wysocki
2012-01-20 6:12 ` Paul E. McKenney
2012-01-20 23:49 ` Rafael J. Wysocki
2012-01-23 16:45 ` Paul E. McKenney
2012-01-23 21:04 ` Rafael J. Wysocki [this message]
2012-01-18 22:12 ` Alan Cox
2012-01-18 22:19 ` Simon Glass
2012-01-19 0:08 ` Rafael J. Wysocki
2012-01-19 0:58 ` Simon Glass
2012-01-18 23:07 ` [PATCH 1/2] power: Add function to init wakeup capability without enabling Simon Glass
2012-01-18 23:07 ` [PATCH 2/2] serial: Use device_init_wakeup_flag() to make device wakeup-capable Simon Glass
2012-01-19 0:10 ` [PATCH 1/2] power: Add function to init wakeup capability without enabling 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=201201232204.35738.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=sjg@chromium.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;
as well as URLs for NNTP newsgroup(s).