public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: suggestion on resumption
Date: Fri, 27 Nov 2009 23:37:17 +0100	[thread overview]
Message-ID: <200911272337.17519.oliver@neukum.org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0911271237220.30903-100000@netrider.rowland.org>

Am Freitag, 27. November 2009 18:43:12 schrieb Alan Stern:
> > But the resume method in the driver doesn't learn. It is an extrem hassle
> > not to know whether you are called synchronously (ie from open which
> > already holds a lock) or asynchronously (which means you need to guard
> > against open)
> 
> With the new Runtime PM framework, there isn't always a one-to-one 
> correspondence between resume requests and method callbacks.  So the 
> "reason" for a callback isn't always well defined.  And even if it 
> were, the callback might happen in a different thread from the request.

That is exactly what I need to know.

> The way to guard against open from an asynchronous context is to 
> approach the problem the other way around: Guard against async contexts 
> while open is running.  In other words, have open do an autoresume.

That is the problem locking requirements are different when I do that
and I don't know what's the case.

	Regards
		Oliver

  reply	other threads:[~2009-11-27 22:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 21:59 suggestion on resumption Oliver Neukum
2009-11-27  0:47 ` Rafael J. Wysocki
2009-11-27  8:18   ` Oliver Neukum
2009-11-27 17:43     ` Alan Stern
2009-11-27 22:37       ` Oliver Neukum [this message]
2009-11-28 16:22         ` Alan Stern

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=200911272337.17519.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stern@rowland.harvard.edu \
    /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