mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: dtor_core@ameritech.net
Cc: Pavel Machek <pavel@suse.cz>, Stefan Seyfried <seife@suse.de>,
	Andy Isaacson <adi@hexapodia.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	Vojtech Pavlik <vojtech@suse.cz>
Subject: Re: swsusp 'disk' fails in bk-current - intel_agp at fault?
Date: Wed, 30 Mar 2005 01:19:00 +0200	[thread overview]
Message-ID: <200503300119.01015.rjw@sisk.pl> (raw)
In-Reply-To: <d120d5000503250804176343f9@mail.gmail.com>

Hi,

On Friday, 25 of March 2005 17:04, Dmitry Torokhov wrote:
> On Fri, 25 Mar 2005 16:42:37 +0100, Pavel Machek <pavel@suse.cz> wrote:
> > Hi!
> > 
> > > > > This is more of a general swsusp problem I believe - the second phase
> > > > > when it blindly resumes entire system. Resume of a device can fail
> > > > > (any reason whatsoever) and it will attempt to clean up after itself,
> > > > > but userspace is dead and hotplug never completes. While I am
> > > > > interested to know why ALPS does not want to resume on ANdy's laptop
> > > > > the issue will never be completely resolved from within the input
> > > > > system.
> > > >
> > > > When device fails to resume, what should I do? I think I could
> > > >
> > > >        if (error)
> > > >                panic("Device resume failed\n");
> > > >
> > > > , but... that does not look like what you want.
> > >
> > > Oh, always panic-happy Pavel ;). It really depends on what kind of
> > > device has faled to resume. If the device is really needed for writing
> > > image then panic is the only recourse, but if it some other device you
> > > resuming just ignore it, who cares...
> > 
> > You are right, for resume-during-suspend, we may as well risk it. We
> > have consistent state, and if we happen to write it on disk,
> > everything is okay.
> > 
> > For resume-during-resume, I don't really know how we can handle
> > that. Running with some devices non-working seems dangerous to me.
> >
> 
> I think it again varies, and the driver would have to decide what to
> do if it can not resume hardware.

Well, I don't think that the driver would be able to state that its failure
is "serious enough", for example, to panic().  This is only known to the
higher-level code that calls the driver's _resume() routine.  IMO the driver
should not make any assumptions of its importance (eg a SCSI driver
that panic()s, because it's unable to resume a disk which does not
even contain a mounted partition is not a good idea ;-)).

> Take for example USB - i believe USB 
> guys are shooting at being able to disconnect device while the box is
> suspended and have it removed from the system when resuming. In
> Probably every driver that has even a slighest notion of
> hot-pluggability should just properly clean up after itself and not
> signal error to the core.

Unless, for instance, one of its devices contains the root filesystem.
  
> > > Btw, I dont think that doing selective resume (as opposed to selective
> > > suspend and Nigel's partial device trees) would be so much
> > > complicated. You'd always resume sysdevs and then, when iterating over
> > > "normal" devices, just skip ones not in resume path. It can all be
> > > contained in driver core I believe (sorry but no patch, for now at
> > > least).
> > 
> > :-) I think we can simply make device freeze/unfreeze fast enough.
> > [We do not need to do full suspend/resume; freeze is enough].

If the driver is compiled as a module, its devices may be uninitialized
when its _resume() routine is called (eg in the resume-during-resume).
Hence, IMHO, we can forget the "unfreeze" thing until we can differentiate
the resume-during-suspend from the resume-during-resume etc. ...

Greets,
Rafael


-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
		-- Lewis Carroll "Alice's Adventures in Wonderland"

  parent reply	other threads:[~2005-03-29 23:23 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 18:49 Andy Isaacson
2005-03-24 14:27 ` Stefan Seyfried
2005-03-24 18:10   ` Andy Isaacson
2005-03-24 19:18     ` Dmitry Torokhov
2005-03-24 20:20       ` Andy Isaacson
2005-03-24 21:10         ` Dmitry Torokhov
2005-03-24 23:54           ` Andy Isaacson
2005-03-25  9:22             ` Stefan Seyfried
2005-03-25 10:13               ` Pavel Machek
2005-03-25 14:19                 ` Dmitry Torokhov
2005-03-25 14:24                   ` Pavel Machek
2005-03-25 14:52                     ` Dmitry Torokhov
2005-03-25 15:42                       ` Pavel Machek
2005-03-25 16:04                         ` Dmitry Torokhov
2005-03-28 23:00                           ` Pavel Machek
2005-03-29 23:19                           ` Rafael J. Wysocki [this message]
2005-03-29 21:49                       ` Rafael J. Wysocki
2005-03-25 18:36                 ` Andy Isaacson
2005-03-29 16:18               ` Dmitry Torokhov
2005-03-29 18:18                 ` Pavel Machek
2005-03-29 19:11                   ` Dmitry Torokhov
2005-03-29 19:23                     ` Pavel Machek
2005-03-29 20:05                       ` Dmitry Torokhov
2005-03-29 20:52                         ` Pavel Machek
2005-03-29 21:07                           ` Dmitry Torokhov
2005-03-29 21:12                             ` Pavel Machek
2005-03-29 21:33                               ` Dmitry Torokhov
2005-03-29 21:44                                 ` Pavel Machek
2005-03-29 22:31                                   ` [linux-pm] " Nigel Cunningham
2005-03-29 22:35                                     ` Pavel Machek
2005-03-29 23:46                                       ` Nigel Cunningham
2005-03-31  7:26                                       ` Dmitry Torokhov
2005-03-31  8:39                                         ` Pavel Machek
2005-03-31 15:02                                           ` Dmitry Torokhov
2005-03-31 16:02                                         ` Patrick Mochel
2005-03-31 16:32                                           ` Dmitry Torokhov
2005-03-31 22:16                                             ` Nigel Cunningham
2005-03-31 22:18                                             ` Pavel Machek
2005-03-31 22:28                                               ` Nigel Cunningham
2005-04-01  8:49                                                 ` Rafael J. Wysocki
2005-04-01 10:33                                                   ` Stefan Seyfried
2005-03-29 23:05                               ` Rafael J. Wysocki
2005-03-29 21:23                           ` [linux-pm] " Patrick Mochel
2005-03-29 21:38                             ` Dmitry Torokhov
2005-03-30  9:52                             ` Greg KH
2005-03-25 14:58             ` Dmitry Torokhov
2005-03-30  7:26               ` Andy Isaacson
2005-03-24 21:14         ` Dmitry Torokhov
2005-03-24 20:38     ` Stefan Seyfried
2005-03-29 18:42       ` Dmitry Torokhov
2005-03-30  7:24         ` Andy Isaacson
     [not found] ` <20050525171825.51a06908.akpm@osdl.org>
2005-05-27 17:44   ` Andy Isaacson

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=200503300119.01015.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=adi@hexapodia.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=seife@suse.de \
    --cc=vojtech@suse.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

all inboxes | Powered by JetHome®