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

Nigel Cunningham
2006-06-15T01:54:46Z

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

Hi.

On Thursday 15 June 2006 10:07, Linus Torvalds wrote:
> On Thu, 15 Jun 2006, Pavel Machek wrote:
> > On St 14-06-06 15:59:00, Linus Torvalds wrote:
> > > There is no "console device".
> > >
> > > There are potentially _many_ console devices.
> >
> > With printks going to all of them?
>
> Yup.
>
> > My point is that you really want the console enabled in writing phase
> > of suspend-to-disk. And old setup got that detail right, while new
> > setup does not.
>
> I definitely agree that we can change things around a bit. I don't
> personally use suspend-to-disk, and I'm a bit tired of having people tell
> me STD works, when STR is what I have always cared about, so if the tables
> are turned for once, I won't be _too_ sorry.

Sorry to disappoint, but I've just started testing, and it works fine
with Suspend2, so I don't see any reason to believe swsusp won't
work as well. For the trace patch, I did need to add a trace section
to the x86_64 code (patch below). Now I'll see if I can reproduce the
unreliability I've been having, and see if the tracing works and helps.

> I have always argued that the suspend should be a two-phase thing: a
> "prepare to suspend" (that saves the device state) and then a "real
> suspend" (that actually turns off devices).

Fwiw, I agree. Wouldn't it also help with that acpi memory allocation
issue that's hung around for so long?

> And quite frankly, until we do it the way I say we should do it, I don't
> think you can _ever_ do things well. For example, the whole thing where we
> have hacks to try to avoid suspending the device that is the disk to
> suspend to all comes from this same problem.

There I'm not so sure - I think the issue there is that we didn't
distinguish between 'stop activity' and 'power down'. If I'm up
with the play, that's being addressed in those new patches to
add a _FREEZE state.

Regards,

Nigel

Signed-off-by: Nigel Cunningham <nigel@suspend2.net>

vmlinux.lds.S | 7 +++++++
1 file changed, 7 insertions(+)
diff -ruNp 9931-x86-64-tracedata-section.patch-old/arch/x86_64/kernel/vmlinux.lds.S 9931-x86-64-tracedata-section.patch-new/arch/x86_64/kernel/vmlinux.lds.S
--- 9931-x86-64-tracedata-section.patch-old/arch/x86_64/kernel/vmlinux.lds.S 2006-06-15 11:32:20.000000000 +1000
+++ 9931-x86-64-tracedata-section.patch-new/arch/x86_64/kernel/vmlinux.lds.S 2006-06-15 11:31:19.000000000 +1000
@@ -45,6 +45,13 @@ SECTIONS

RODATA

+ . =ALIGN(4);
+ __tracedata_start =.;
+ .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
+ *(.tracedata)
+ }
+ __tracedata_end =.;
+
/* Data */
.data : AT(ADDR(.data) - LOAD_OFFSET) {
*(.data)

--
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 --]