LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: nigel@nigel.suspend2.net
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Pavel Machek <pavel@ucw.cz>,
Linux Kernel List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won't drain
Date: Mon, 14 Jan 2008 10:04:15 +0000 [thread overview]
Message-ID: <20080114100415.GC22818@flint.arm.linux.org.uk> (raw)
In-Reply-To: <478ACB90.3040709@suspend2.net>
On Mon, Jan 14, 2008 at 01:40:16PM +1100, nigel@suspend2.net wrote:
> Hi.
>
> Alan Cox wrote:
> >>> Is printk() enough for 'we've just lost your data' condition? Maybe we
> >>> should abort suspend if we can't drain fifo?
> >> No way. Think about this from a users' perspective. No one wants suspend
> >> to ram or hibernate functionality that works sometimes and not others.
> >> They want it to work reliably so they don't have to worry about their
> >> laptop overheating while they're getting on the bus or airplane.
> >> Aborting isn't an option.
> >
> > Dumb question on the printk however - what if the port that is sticking
> > is the console - don't we recurse and die ?
>
> I don't know, but I'd argue that we shouldn't die. Things should be as
> robust as possible.
Of course we should never die. That's precisely what I'm trying to work
towards here.
Currently without this patch, various platforms I have here do precisely
that - you ask them to suspend and they shut down the majority of devices
and then die. The recovery is either system reboot or a power cycle -
especially when the port in question is connected to something other than
an external serial port (eg, a serial port for connection to a non-existent
bluetooth module.)
While we're talking about robustness, since the serial wakeup support has
gone in, another couple of issues have appeared:
1. We no longer suspend ports marked as wakeup sources. That means we
never place them into a low power state (which might be required by
hardware) - we need a flag from the driver or something to indicate
that.
2. As a direct consequence, we no longer re-initialise the port at resume
time, resulting in a completely deconfigured but open port. Such a
port may be the system console, which will cause any printks may be
damned slow and the output will be garbage.
(2) is quite a serious problem for ARM platforms - you lose the console
entirely and you also lose control of the system. Again, recovery from
such events is by either a power cycle or system reboot.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2008-01-14 10:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 11:51 [PATCH: 1/2] [SERIAL] avoid waking up closed serial ports on resume Russell King
2008-01-08 11:57 ` [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won't drain Russell King
2008-01-09 0:06 ` Andrew Morton
2008-01-09 1:29 ` Alan Cox
2008-01-09 8:34 ` Russell King
2008-01-11 10:17 ` Pavel Machek
2008-01-13 22:51 ` nigel
2008-01-14 0:49 ` Alan Cox
2008-01-14 2:40 ` nigel
2008-01-14 10:04 ` Russell King [this message]
2008-01-14 9:46 ` Russell King
2008-01-13 22:56 ` Benjamin Herrenschmidt
2008-01-14 0:29 ` Russell King
2008-01-14 9:04 ` Pavel Machek
2008-01-14 9:35 ` Russell King
2008-01-14 10:21 ` Alan Cox
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=20080114100415.GC22818@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=nigel@nigel.suspend2.net \
--cc=pavel@ucw.cz \
--subject='Re: [PATCH: 2/2] [SERIAL] avoid stalling suspend if serial port won'\''t drain' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).