mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: [PATCH 5] PM: Update comments describing device power management callbacks
Date: Mon, 21 Nov 2011 23:33:07 +0100	[thread overview]
Message-ID: <201111212333.07799.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1111211717500.1848-100000@iolanthe.rowland.org>

On Monday, November 21, 2011, Alan Stern wrote:
> On Mon, 21 Nov 2011, Rafael J. Wysocki wrote:
> 
> > > > I said "Analogous to @suspend()" instead.  I'm not sure why this is not
> > > > sufficient?
> > > 
> > > Because @suspend() is very different!  Its description basically says 
> > > to do three things:
> > > 
> > > 	Quiesce the device,
> > > 
> > > 	Put it into a low-power state,
> > > 
> > > 	And enable wakeup events.
> > 
> > No, it doesn't any more.  It's being changed by the proposed patch too. :-)
> 
> I must have missed reading that part.  Okay...  but it seems weird that
> none of the new descriptions says anything about changing the power
> state.  Shouldn't the description of @suspend say something like "For
> many platforms and subsystems, the device should be put in a low-power
> state"?

Hmm.  I'm not really sure, actually, because I'd recommend that subsystems
rather than drivers change power states of devices and this description
is targeted at driver writers mostly.

> > > @freeze() is supposed to do the first but not the second or third.  
> > > This makes it only 33% similar to @suspend().  :-)
> > > 
> > > Also, the description of @suspend() says nothing about having a
> > > consistent memory image.
> > 
> > Because that is irrelevant.  The state of the device after the resume
> > has to be consistent, regardless of whether the resume is from RAM or
> > from an on-disk image.
> 
> Sure, the device's state will be consistent.  But will the contents of
> memory image be consistent?  Not if the device was doing DMA writes
> during the time when the image was created.

Well, since .suspend() is also expected to stop DMA, that's rather moot.

Thanks,
Rafael

  reply	other threads:[~2011-11-21 22:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20  0:53 [PATCH 0/3] PM: Documentation updates Rafael J. Wysocki
2011-11-20  0:54 ` [PATCH 1/3] PM / Domains: Document how PM domains are used by the PM core Rafael J. Wysocki
2011-11-20  0:56 ` [PATCH 2/3] PM / Sleep: Correct inaccurate information in devices.txt Rafael J. Wysocki
2011-11-20  0:56 ` [PATCH 3/3] PM / Runtime: Make documentation follow the new behavior of irq_safe Rafael J. Wysocki
2011-11-20 10:13 ` [PATCH 4] Rafael J. Wysocki
2011-11-20 23:38 ` [PATCH 5] PM: Update comments describing device power management callbacks Rafael J. Wysocki
2011-11-21  2:56   ` Alan Stern
2011-11-21 20:02     ` Rafael J. Wysocki
2011-11-21 21:03       ` Alan Stern
2011-11-21 21:23         ` Rafael J. Wysocki
2011-11-21 21:49           ` Alan Stern
2011-11-21 21:57             ` Rafael J. Wysocki
2011-11-21 22:23               ` Alan Stern
2011-11-21 22:33                 ` Rafael J. Wysocki [this message]
2011-11-22 15:57                   ` Alan Stern
2011-11-22 20:47                     ` Rafael J. Wysocki
2011-11-22 21:02                       ` Alan Stern
2011-11-22 23:40                         ` Rafael J. Wysocki
2011-11-23 16:28                           ` Alan Stern
2011-11-23 20:01                             ` Rafael J. Wysocki
2011-11-22  3:36   ` Ming Lei
2011-11-22 20:41     ` 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=201111212333.07799.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --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

all inboxes | Powered by JetHome®