public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>,
	pm list <linux-pm@lists.linux-foundation.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Len Brown <lenb@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Alexey Starikovskiy <astarikovskiy@suse.de>,
	David Brownell <david-b@pacbell.net>, Pavel Machek <pavel@ucw.cz>,
	Oliver Neukum <oliver@neukum.org>,
	Nigel Cunningham <ncunningham@crca.org.au>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 8)
Date: Mon, 14 Apr 2008 09:46:30 +1000	[thread overview]
Message-ID: <1208130390.6958.71.camel@pasglop> (raw)
In-Reply-To: <200804140108.05447.rjw@sisk.pl>


On Mon, 2008-04-14 at 01:08 +0200, Rafael J. Wysocki wrote:
> 
> Well, if we put ->prepare() before the freezer, what can it actually do?
> Certainly nothing that will block any (user space) task, because the freezer
> won't work after that.  So, all of the significant suspend work, like blocking
> tasks using the device etc., will have to be done by ->suspend().  Will that be
> convenient?  I'm not sure.  I'm not even sure that would be _doable_ at all.

Most of the actual suspending of requests queues etc... has to be done
in suspend. Nothing changed here. I don't see why it would change.
prepare() is a way to preallocate things when needed, cache things when
needed, etc... and possibly interact user space. At least that how I see
it.

It -is- acceptable to stop servicing user space after prepare() in some
well defined cases such as the DRM, as long as in-kernel users aren't
affected. But that's not necessarily what I have in mind. In the case us
userspace for example, the idea here is to perform the migration of all
the dirty data in the VRAM (that will be lost during suspend) out to
main memory (or AGP memory). That doesn't mean necessarily that the DRM
will stop servicing anything from there, it can still perform things. It
might mean that user space would have to disable some accelerations that
rely on dirty data in VRAM though until complete() is called.

> The point of view depends on what you think ->prepare() should be used for
> and I'm sure you have some specific cases in mind.  However, are they generic
> enough?

request_firmware() & caching the resulting firmware so that the driver
can resume & start operating right away is an example (think about NFS
over wireless here for example, or iSCSI). the DRM example above. In
general, any driver that needs to interact with user space, perform
large allocations, muck around with the VM, etc...

prepare() isn't intended to stop operations, but to
preload/cache/prepare and have userspace available for drivers where
this is needed. In some case, that might need the driver will continue
operating in some degraded mode (for example, a multiqueue driver can
degrade to a single queue with one pre-allocated request to avoid
relying on allocations).

I would expect most simple drivers not to need it of course.

Cheers,
Ben.




  reply	other threads:[~2008-04-13 23:47 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03 23:11 [PATCH 0/3] PM: New suspend and hibernation callbacks Rafael J. Wysocki
2008-04-03 23:12 ` [PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 7) Rafael J. Wysocki
2008-04-12  0:23   ` Greg KH
2008-04-13 13:31     ` Rafael J. Wysocki
2008-04-13 13:33       ` [PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 8) Rafael J. Wysocki
2008-04-13 21:05         ` Benjamin Herrenschmidt
2008-04-13 21:39           ` Rafael J. Wysocki
2008-04-13 22:10             ` Benjamin Herrenschmidt
2008-04-13 22:27               ` Rafael J. Wysocki
2008-04-13 22:47                 ` Benjamin Herrenschmidt
2008-04-13 23:08                   ` Rafael J. Wysocki
2008-04-13 23:46                     ` Benjamin Herrenschmidt [this message]
2008-04-14  0:31                       ` Rafael J. Wysocki
2008-04-14  0:46                         ` Benjamin Herrenschmidt
2008-04-14  1:09                           ` Rafael J. Wysocki
2008-04-14  3:23                             ` Benjamin Herrenschmidt
2008-04-14  6:43                               ` Oliver Neukum
2008-04-14  7:23                                 ` Benjamin Herrenschmidt
2008-04-14  7:37                                   ` Oliver Neukum
2008-04-14  7:50                                     ` Benjamin Herrenschmidt
2008-04-14 12:11                               ` Rafael J. Wysocki
2008-04-14 15:13                                 ` Alan Stern
2008-04-14 20:48                                   ` Benjamin Herrenschmidt
2008-04-14 14:49                               ` Alan Stern
2008-04-14 20:41                                 ` Oliver Neukum
2008-04-14  1:37                           ` Nigel Cunningham
2008-04-14 12:25                             ` Rafael J. Wysocki
2008-04-13 23:11                   ` Nigel Cunningham
2008-04-13 23:17                     ` Rafael J. Wysocki
2008-04-13 23:29                       ` Nigel Cunningham
2008-04-13 23:23                     ` Alan Stern
2008-04-13 23:33                       ` Rafael J. Wysocki
2008-04-13 23:49                         ` Benjamin Herrenschmidt
2008-04-13 23:48                       ` Benjamin Herrenschmidt
2008-04-14  0:07                         ` Rafael J. Wysocki
2008-04-14  0:40                           ` Benjamin Herrenschmidt
2008-04-14  0:59                             ` Rafael J. Wysocki
2008-04-14  0:43                           ` Benjamin Herrenschmidt
2008-04-14  0:50                             ` Rafael J. Wysocki
2008-04-14  4:47                   ` David Brownell
2008-04-14 12:34                     ` Rafael J. Wysocki
2008-04-14 14:51                     ` Alan Stern
2008-04-14 20:47                       ` Benjamin Herrenschmidt
2008-04-14 21:21                       ` Pavel Machek
2008-04-14 10:55                   ` Pavel Machek
2008-04-14 20:45                     ` Benjamin Herrenschmidt
2008-04-14 20:56                       ` Rafael J. Wysocki
2008-04-15 19:27         ` patch pm-introduce-new-top-level-suspend-and-hibernation-callbacks.patch added to gregkh-2.6 tree gregkh
2008-04-13 13:33       ` [PATCH 2/3] PM: New suspend and hibernation callbacks for platform bus type (rev. 3) Rafael J. Wysocki
2008-04-15 19:27         ` patch pm-new-suspend-and-hibernation-callbacks-for-platform-bus-type.patch added to gregkh-2.6 tree gregkh
2008-04-13 13:34       ` [PATCH 3/3] PM: New suspend and hibernation callbacks for PCI bus type (rev. 4) Rafael J. Wysocki
2008-04-15 19:27         ` patch pm-new-suspend-and-hibernation-callbacks-for-pci-bus-type.patch added to gregkh-2.6 tree gregkh
2008-04-29 22:26         ` PM: New suspend and hibernation callbacks for PCI bus type Greg KH
2008-04-30 12:09           ` Rafael J. Wysocki
2008-04-03 23:13 ` [PATCH 2/3] PM: New suspend and hibernation callbacks for platform bus type (rev. 3) Rafael J. Wysocki
2008-04-03 23:15 ` [PATCH 3/3] PM: New suspend and hibernation callbacks for PCI " 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=1208130390.6958.71.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=astarikovskiy@suse.de \
    --cc=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=ncunningham@crca.org.au \
    --cc=oliver@neukum.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --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