Re: [PATCH 2/2] Fix console handling during suspend/resume

Nigel Cunningham
2006-06-15T06:00:26Z

[-- Attachment #1.1: Type: text/plain, Size: 1400 bytes --]

Hi.

On Thursday 15 June 2006 11:46, David Brownell wrote:
> On Wednesday 14 June 2006 4:57 pm, Pavel Machek wrote:
> > My point is that you really want the console enabled in writing phase
> > of suspend-to-disk.
>
> Notice how nicely this generalizes a point that's been made before:
> Linux should have the ability to exclude certain devices (and their
> parents) from that first "prepare to suspend" phase. Originally the
> canonical example was the swap device (and its disk, controller, bus
> tree, etc). Now we recognize consoles (and their parents, network
> controllers, etc) have the same issue ...

Wouldn't it be simpler to say "We send the prepare_to_suspend/freeze/suspend
messages to all devices, but some have the nous to know to ignore them"?

To put flesh on what I'm saying, I would imagine that the right behaviour of
the device to which we're writing the image would be:

prepare_to_suspend: Allocate any memory needed for freezing and/or suspending,
ensure any firmware images needed are in memory and so on.
freeze: Quiesce the queue, flush writes but don't power down.
suspend: Freeze + power down.

Another device, say the console might treat freeze as a noop.

Is there something I'm missing that makes this impractical?

Regards,

Nigel
--
Nigel, Michelle and Alisdair Cunningham
5 Mitchell Street
Cobden 3266
Victoria, Australia

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]