public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Oliver Neukum <oliver@neukum.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
	linux-kernel@vger.kernel.org, Kyle Moffett <mrmacman_g4@mac.com>,
	Pavel Machek <pavel@ucw.cz>,
	linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH] Remove process freezer from suspend to RAM pathway
Date: Mon, 09 Jul 2007 19:33:56 +1000	[thread overview]
Message-ID: <1183973636.5961.37.camel@localhost.localdomain> (raw)
In-Reply-To: <200707091123.57400.oliver@neukum.org>

On Mon, 2007-07-09 at 11:23 +0200, Oliver Neukum wrote:
> Suspension is to be transparent. Apart from a jump in the system clock
> user space must not notice, thus returning errors due to suspension is
> not an option.

Who says ?

If I'm talking to a USB printer, it will notice the USB bus being
suspended, believe me. It's actually likely to screw up whatever job is
in progress. It make perfect sense to error out attempts to talk to it
when suspended.

I don't think "transparent" is an absolute requirement. In some cases,
it doesn't make sense and the printer is a good example of that. The
printing daemon is typically something that will ideally need to grow
knowledge about suspend/resume to interrupt things at the right time.

That's one of the thing... we don't even have the kernel right, so we
are light-years from having the rest of userland right.

For example, from a user point of view, what should happen if you
suspend while printing ?

Well, it's a matter of policy (thus should be configurable), but I would
exect (as a former Mac user) something around the lines of this as a
default:

 - If the laptop's clamshell has been closed, it's likely that the
user's just picking up the laptop for a ride, makes sense to abort jobs
in progress.

 - If this is a manual action via the menus, displaying a dialog asking
if you really want to suspend before your page is finished makes sense
(with that dialog disappearing and the machine going to sleep if you
just wait and let it print).

That sort of thing requires much more than just kernel collaboration of
course, but a whole infrastructure in userland as well.

So no, suspend is -not- transparent, doesn't have to be, it's something
that is to be decided on a case-by-case basis (or rather,
driver-per-driver and possibly via policy settings).

Ben.

  parent reply	other threads:[~2007-07-09  9:33 UTC|newest]

Thread overview: 198+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44L0.0707072224270.10912-100000@netrider.rowland.org>
2007-07-08  5:14 ` [PATCH] Remove process freezer from suspend to RAM pathway Benjamin Herrenschmidt
     [not found] ` <1183871661.3388.282.camel@localhost.localdomain>
2007-07-08  5:19   ` Benjamin Herrenschmidt
2007-07-08 19:15   ` Rafael J. Wysocki
2007-07-08 20:16   ` Alan Stern
2007-07-08 20:55   ` Pavel Machek
     [not found]   ` <Pine.LNX.4.44L0.0707081517540.11049-100000@netrider.rowland.org>
2007-07-08 21:01     ` Pavel Machek
2007-07-08 21:20     ` Benjamin Herrenschmidt
2007-07-08 21:35     ` Rafael J. Wysocki
     [not found]     ` <1183929611.3388.303.camel@localhost.localdomain>
2007-07-08 22:06       ` Rafael J. Wysocki
     [not found]       ` <200707090006.32712.rjw@sisk.pl>
2007-07-09  0:33         ` Benjamin Herrenschmidt
2007-07-09  0:57           ` Kyle Moffett
     [not found]           ` <FFA29D56-3400-4EA3-8CE8-C1EF75484510@mac.com>
2007-07-09  1:32             ` Benjamin Herrenschmidt
2007-07-09  6:47       ` Oliver Neukum
     [not found]       ` <200707090847.43378.oliver@neukum.org>
2007-07-09  9:13         ` Benjamin Herrenschmidt
2007-07-09  9:23           ` Oliver Neukum
     [not found]           ` <200707091123.57400.oliver@neukum.org>
2007-07-09  9:33             ` Benjamin Herrenschmidt [this message]
2007-07-09 14:57               ` Adrian Bunk
2007-07-09 10:02         ` Pavel Machek
2007-07-09 10:05           ` Benjamin Herrenschmidt
2007-07-09 16:03       ` Alan Stern
     [not found]   ` <200707082115.27363.rjw@sisk.pl>
2007-07-08 21:03     ` Benjamin Herrenschmidt
2007-07-08 21:07       ` Pavel Machek
2007-07-08 21:45       ` Rafael J. Wysocki
     [not found]       ` <200707082345.27859.rjw@sisk.pl>
2007-07-08 21:54         ` Benjamin Herrenschmidt
     [not found]         ` <1183931688.3388.316.camel@localhost.localdomain>
2007-07-08 22:13           ` hibernation/snapshot design [was Re: [PATCH] Remove process freezer from suspend to RAM pathway] Pavel Machek
     [not found]           ` <20070708221315.GF5401@elf.ucw.cz>
2007-07-08 22:23             ` david
2007-07-08 23:00               ` Pavel Machek
     [not found]               ` <20070708230042.GH5401@elf.ucw.cz>
2007-07-08 23:20                 ` david
     [not found]                 ` <Pine.LNX.4.64.0707081614211.25614@asgard.lang.hm>
2007-07-08 23:28                   ` Pavel Machek
     [not found]                   ` <20070708232819.GJ5401@elf.ucw.cz>
2007-07-08 23:45                     ` david
2007-07-09 15:23                     ` hibernation/snapshot design Jeremy Maitin-Shepard
2007-07-08 23:01             ` hibernation/snapshot design [was Re: [PATCH] Remove process freezer from suspend to RAM pathway] Rafael J. Wysocki
     [not found]             ` <200707090101.28832.rjw@sisk.pl>
2007-07-08 23:03               ` Pavel Machek
2007-07-10  1:33               ` Nigel Cunningham
     [not found]               ` <200707101133.01566.nigel@nigel.suspend2.net>
2007-07-10  1:56                 ` Paul Mackerras
     [not found] <200707082046.36864.rjw@sisk.pl>
2007-07-08 20:22 ` [PATCH] Remove process freezer from suspend to RAM pathway Alan Stern
     [not found] ` <Pine.LNX.4.44L0.0707081619090.11049-100000@netrider.rowland.org>
2007-07-08 21:08   ` Pavel Machek
2007-07-08 21:21   ` Benjamin Herrenschmidt
     [not found]   ` <1183929708.3388.306.camel@localhost.localdomain>
2007-07-09  6:52     ` Oliver Neukum
     [not found]     ` <200707090852.03429.oliver@neukum.org>
2007-07-09  9:14       ` Benjamin Herrenschmidt
2007-07-09 11:56         ` Rafael J. Wysocki
     [not found] <1183871941.3388.286.camel@localhost.localdomain>
2007-07-08 20:17 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.0707072218030.10912-100000@netrider.rowland.org>
2007-07-08  4:39 ` Benjamin Herrenschmidt
2007-07-08 18:46   ` Rafael J. Wysocki
2007-07-08 18:26 ` Rafael J. Wysocki
     [not found] <1183855732.3388.240.camel@localhost.localdomain>
2007-07-08  2:53 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.0707071255590.26860-100000@netrider.rowland.org>
2007-07-08  0:48 ` Benjamin Herrenschmidt
     [not found] <1183781219.3388.225.camel@localhost.localdomain>
2007-07-07 17:19 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.0707062210470.7605-100000@netrider.rowland.org>
2007-07-07  4:06 ` Benjamin Herrenschmidt
     [not found] <Pine.LNX.4.44L0.0707061034540.3737-100000@iolanthe.rowland.org>
2007-07-07  3:44 ` Benjamin Herrenschmidt
2007-07-07 11:49   ` Pavel Machek
2007-07-08  0:40     ` Benjamin Herrenschmidt
2007-07-07 16:17   ` Alan Stern
2007-07-08  0:42     ` Benjamin Herrenschmidt
     [not found]     ` <1183855362.3388.233.camel@localhost.localdomain>
2007-07-08  2:24       ` Alan Stern
2007-07-08 18:20       ` Rafael J. Wysocki
     [not found] <EAA83A3B-1534-458B-A6F8-D090D670D4E7@mac.com>
2007-07-07  2:59 ` Alan Stern
     [not found] <Pine.LNX.4.44L0.0707061114190.3737-100000@iolanthe.rowland.org>
2007-07-07  0:43 ` Kyle Moffett
     [not found] <Pine.LNX.4.44L0.0707051023520.3728-100000@iolanthe.rowland.org>
2007-07-05 17:42 ` Miklos Szeredi
2007-07-05 20:43   ` Alan Stern
     [not found] <20070703224215.GA30081@srcf.ucam.org>
2007-07-04 14:38 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.0707041030540.25704-100000@netrider.rowland.org>
2007-07-04 14:58   ` Matthew Garrett
     [not found]   ` <20070704145818.GA7784@srcf.ucam.org>
2007-07-04 15:02     ` Oliver Neukum
2007-07-04 15:57     ` Alan Stern
     [not found] <fa.ftLWBLCc+XqdYjiuxoPg+qyuUOE@ifi.uio.no>
     [not found] ` <fa.Oxrm8HYXTOF4jv5LrTjEe16lCE0@ifi.uio.no>
     [not found]   ` <fa.d3GOse+YbAb42uYwLymWkJiH9Fw@ifi.uio.no>
2007-07-04  0:17     ` Robert Hancock
     [not found]     ` <468AE700.7080102@shaw.ca>
2007-07-04  0:34       ` Matthew Garrett
     [not found]       ` <20070704003424.GA30958@srcf.ucam.org>
2007-07-04 10:21         ` Rafael J. Wysocki
     [not found] <20070703211227.GA28758@srcf.ucam.org>
2007-07-03 21:16 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.0707031713530.8010-100000@iolanthe.rowland.org>
2007-07-03 21:20   ` Matthew Garrett
2007-07-03 21:37     ` Rafael J. Wysocki
2007-07-03 22:21     ` Alan Stern
     [not found]     ` <Pine.LNX.4.44L0.0707031814440.8010-100000@iolanthe.rowland.org>
2007-07-03 22:42       ` Matthew Garrett
     [not found]     ` <200707032337.52544.rjw@sisk.pl>
2007-07-03 21:36       ` Matthew Garrett
     [not found]       ` <20070703213639.GA29149@srcf.ucam.org>
2007-07-03 21:47         ` Oliver Neukum
2007-07-03 22:46         ` Rafael J. Wysocki
2007-07-04  3:38       ` Paul Mackerras
     [not found]       ` <18059.5690.908102.273897@cargo.ozlabs.ibm.com>
2007-07-04 10:42         ` Rafael J. Wysocki
2007-07-04 10:58           ` Paul Mackerras
2007-07-04 11:25             ` Rafael J. Wysocki
     [not found]             ` <200707041325.55779.rjw@sisk.pl>
2007-07-04 11:34               ` Paul Mackerras
2007-07-04 11:51               ` Miklos Szeredi
2007-07-04 12:41               ` Theodore Tso
     [not found]               ` <20070704124133.GA5836@thunk.org>
2007-07-04 14:40                 ` Rafael J. Wysocki
     [not found]               ` <18059.34264.421573.246262@cargo.ozlabs.ibm.com>
2007-07-04 14:12                 ` Dmitry Torokhov
2007-07-04 15:38                 ` Alan Stern
2007-07-04 19:07                   ` Alan Stern
     [not found]               ` <E1I63Nv-0006Z9-00@dorka.pomaz.szeredi.hu>
2007-07-04 14:41                 ` Rafael J. Wysocki
2007-07-04 14:45                   ` Miklos Szeredi
2007-07-04 15:03                     ` Oliver Neukum
     [not found]                     ` <200707041703.21808.oliver@neukum.org>
2007-07-04 15:17                       ` Rafael J. Wysocki
     [not found]                       ` <200707041717.05149.rjw@sisk.pl>
2007-07-05  0:29                         ` Paul Mackerras
     [not found]                         ` <18060.15209.274437.471074@cargo.ozlabs.ibm.com>
2007-07-05 12:29                           ` Rafael J. Wysocki
2007-07-12 15:13                           ` Pavel Machek
2007-07-04 15:42                 ` Alan Stern
2007-07-04 19:25                   ` Miklos Szeredi
     [not found]                   ` <E1I6ATN-0007QS-00@dorka.pomaz.szeredi.hu>
2007-07-04 21:36                     ` Rafael J. Wysocki
2007-07-05  8:37                       ` Miklos Szeredi
     [not found]                       ` <E1I6Mq2-0008WB-00@dorka.pomaz.szeredi.hu>
2007-07-05 12:39                         ` Rafael J. Wysocki
     [not found]                         ` <200707051439.37737.rjw@sisk.pl>
2007-07-05 12:39                           ` Miklos Szeredi
2007-07-05 16:10                             ` Jeremy Fitzhardinge
     [not found]                             ` <468D17FA.8040201@goop.org>
2007-07-05 17:45                               ` Miklos Szeredi
2007-07-05  0:43                     ` Paul Mackerras
     [not found]                     ` <18060.16064.519060.755991@cargo.ozlabs.ibm.com>
2007-07-05 12:49                       ` Rafael J. Wysocki
2007-07-05  0:36                   ` Paul Mackerras
     [not found]                   ` <18060.15630.812698.367707@cargo.ozlabs.ibm.com>
     [not found]                     ` <200707051451.38497.rjw@sisk.pl>
2007-07-05 12:50                       ` Johannes Berg
     [not found]                       ` <1183639825.3818.38.camel@johannes.berg>
2007-07-05 13:47                         ` Rafael J. Wysocki
2007-07-05 12:51                     ` Rafael J. Wysocki
2007-07-05 14:25                     ` Alan Stern
     [not found] <20070703202329.GA27927@srcf.ucam.org>
2007-07-03 21:10 ` Alan Stern
     [not found] ` <Pine.LNX.4.44L0.0707031708080.8010-100000@iolanthe.rowland.org>
2007-07-03 21:12   ` Matthew Garrett
     [not found] <20070703042916.GA17240@srcf.ucam.org>
2007-07-03  4:54 ` Nigel Cunningham
     [not found] ` <200707031454.42078.nigel@nigel.suspend2.net>
2007-07-03  5:21   ` Matthew Garrett
     [not found]   ` <20070703052130.GA17605@srcf.ucam.org>
2007-07-03  5:24     ` Nigel Cunningham
2007-07-03  5:48   ` Benjamin Herrenschmidt
     [not found]   ` <1183441706.10386.73.camel@localhost.localdomain>
2007-07-03  6:08     ` Nigel Cunningham
     [not found]     ` <200707031608.06348.nigel@nigel.suspend2.net>
2007-07-03  7:19       ` Benjamin Herrenschmidt
     [not found]       ` <1183447184.10386.102.camel@localhost.localdomain>
2007-07-03 12:56         ` Rafael J. Wysocki
     [not found]         ` <200707031456.40890.rjw@sisk.pl>
2007-07-03 21:14           ` Benjamin Herrenschmidt
     [not found]           ` <1183497290.3388.4.camel@localhost.localdomain>
2007-07-03 21:32             ` Rafael J. Wysocki
     [not found]             ` <200707032332.49694.rjw@sisk.pl>
2007-07-03 21:35               ` Benjamin Herrenschmidt
     [not found]               ` <1183498555.3388.14.camel@localhost.localdomain>
2007-07-03 22:43                 ` Rafael J. Wysocki
2007-07-05  9:30             ` Pavel Machek
     [not found]             ` <20070705093013.GA3228@elf.ucw.cz>
2007-07-05 22:46               ` Benjamin Herrenschmidt
     [not found]               ` <1183675615.3388.81.camel@localhost.localdomain>
2007-07-05 23:13                 ` Nigel Cunningham
     [not found]                 ` <200707060913.05644.nigel@nigel.suspend2.net>
2007-07-05 23:20                   ` Benjamin Herrenschmidt
     [not found]                   ` <1183677643.3388.105.camel@localhost.localdomain>
2007-07-05 23:35                     ` Nigel Cunningham
     [not found]                     ` <200707060935.12706.nigel@nigel.suspend2.net>
2007-07-06  1:19                       ` Kyle Moffett
     [not found]                       ` <CF60EC03-0171-4052-924D-57555A393168@mac.com>
2007-07-06  1:37                         ` Nigel Cunningham
2007-07-06  3:59                         ` Benjamin Herrenschmidt
     [not found]                         ` <1183694347.3388.114.camel@localhost.localdomain>
2007-07-06  7:35                           ` Rafael J. Wysocki
2007-07-06  9:03                             ` Benjamin Herrenschmidt
2007-07-06 14:38                           ` Alan Stern
2007-07-06 15:42                         ` Alan Stern
2007-07-06  3:54                       ` Benjamin Herrenschmidt
     [not found]                       ` <1183694055.3388.108.camel@localhost.localdomain>
2007-07-06  4:03                         ` Nigel Cunningham
     [not found]                         ` <200707061403.15932.nigel@nigel.suspend2.net>
2007-07-06  4:41                           ` Benjamin Herrenschmidt
2007-07-06  5:25                             ` Nigel Cunningham
2007-07-06  5:01                           ` Kyle Moffett
     [not found]                           ` <CF605B91-2425-4FC2-9434-5F8877EEEEEB@mac.com>
2007-07-06  5:53                             ` Nigel Cunningham
2007-07-10  2:07                             ` Nigel Cunningham
     [not found]                             ` <200707101207.16711.nigel@nigel.suspend2.net>
2007-07-10  3:03                               ` Kyle Moffett
2007-07-05  0:03     ` Pavel Machek
2007-07-03  5:49 ` Benjamin Herrenschmidt
2007-07-03  5:51 ` Benjamin Herrenschmidt
2007-07-03  6:13 ` Oliver Neukum
     [not found] ` <200707030813.53481.oliver@neukum.org>
2007-07-03  6:51   ` Miklos Szeredi
2007-07-03 12:13   ` Matthew Garrett
     [not found]   ` <20070703121313.GA21318@srcf.ucam.org>
2007-07-03 13:09     ` Rafael J. Wysocki
2007-07-03  7:37 ` Romano Giannetti
2007-07-03 12:56 ` Rafael J. Wysocki
     [not found] ` <1183441748.10386.75.camel@localhost.localdomain>
2007-07-03 13:07   ` Rafael J. Wysocki
     [not found] ` <1183441887.10386.77.camel@localhost.localdomain>
2007-07-03 13:08   ` Rafael J. Wysocki
     [not found]   ` <200707031508.45595.rjw@sisk.pl>
2007-07-03 15:09     ` Rafael J. Wysocki
     [not found]     ` <200707031709.29968.rjw@sisk.pl>
2007-07-03 17:20       ` Oliver Neukum
2007-07-03 20:59         ` Rafael J. Wysocki
2007-07-03 21:35           ` Benjamin Herrenschmidt
     [not found]           ` <1183498518.3388.12.camel@localhost.localdomain>
2007-07-03 22:33             ` Rafael J. Wysocki
2007-07-04 23:39         ` Pavel Machek
     [not found]         ` <20070704233909.GB2719@elf.ucw.cz>
2007-07-05  6:53           ` Oliver Neukum
2007-07-03 18:26       ` Oliver Neukum
2007-07-03 19:13         ` Miklos Szeredi
2007-07-03 19:32           ` Oliver Neukum
2007-07-03 19:47             ` Miklos Szeredi
2007-07-03 21:20             ` Benjamin Herrenschmidt
2007-07-03 21:48               ` Oliver Neukum
     [not found]               ` <200707032348.42796.oliver@neukum.org>
2007-07-03 21:56                 ` Benjamin Herrenschmidt
     [not found]                 ` <1183499792.3388.16.camel@localhost.localdomain>
2007-07-03 22:04                   ` Oliver Neukum
     [not found]                   ` <200707040004.16357.oliver@neukum.org>
2007-07-03 23:08                     ` Benjamin Herrenschmidt
     [not found]                     ` <1183504112.3388.45.camel@localhost.localdomain>
2007-07-04  8:10                       ` Oliver Neukum
2007-07-04 23:45             ` Pavel Machek
     [not found]             ` <20070704234523.GC2719@elf.ucw.cz>
2007-07-05 12:25               ` Rafael J. Wysocki
     [not found]               ` <200707051425.07904.rjw@sisk.pl>
2007-07-05 12:38                 ` Nigel Cunningham
     [not found]                 ` <200707052238.27889.nigel@nigel.suspend2.net>
2007-07-05 13:35                   ` Rafael J. Wysocki
     [not found]                   ` <200707051535.46196.rjw@sisk.pl>
2007-07-05 13:36                     ` Nigel Cunningham
     [not found]                     ` <200707052336.27585.nigel@nigel.suspend2.net>
2007-07-05 13:59                       ` Rafael J. Wysocki
     [not found]                       ` <200707051559.58479.rjw@sisk.pl>
2007-07-05 21:49                         ` Nigel Cunningham
     [not found]                         ` <200707060749.08665.nigel@nigel.suspend2.net>
     [not found]                           ` <200707060940.23248.rjw@sisk.pl>
2007-07-06  7:39                             ` Miklos Szeredi
     [not found]                             ` <E1I6iPL-0003Hj-00@dorka.pomaz.szeredi.hu>
2007-07-06  7:51                               ` Oliver Neukum
2007-07-06  9:09                                 ` Miklos Szeredi
2007-07-06  9:16                                   ` Nigel Cunningham
2007-07-06  9:33                                     ` Miklos Szeredi
2007-07-06  7:40                           ` Rafael J. Wysocki
2007-07-03 21:09         ` Rafael J. Wysocki
2007-07-03 19:27       ` Pavel Machek
     [not found]       ` <20070703192729.GA2125@elf.ucw.cz>
2007-07-03 21:25         ` Rafael J. Wysocki
2007-07-03 21:16     ` Benjamin Herrenschmidt
     [not found] ` <1183448224.12649.14.camel@localhost>
2007-07-03  8:20   ` Oliver Neukum
2007-07-03 13:12   ` Rafael J. Wysocki
2007-07-03 16:03 ` Alan Stern
2007-07-03 16:05   ` Matthew Garrett
2007-07-03 16:57     ` Alan Stern
2007-07-03 17:02       ` Matthew Garrett
2007-07-03 19:33         ` Alan Stern
2007-07-03 19:42           ` Matthew Garrett
2007-07-03 19:54             ` Alan Stern
2007-07-03 20:23               ` Matthew Garrett
2007-07-04 23:33 ` Pavel Machek
2007-07-03  4:29 Matthew Garrett

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=1183973636.5961.37.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=mrmacman_g4@mac.com \
    --cc=oliver@neukum.org \
    --cc=pavel@ucw.cz \
    /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