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

Benjamin Herrenschmidt
2006-06-16T01:17:45Z

On Fri, 2006-06-16 at 08:17 +1000, Paul Mackerras wrote:
> Linus Torvalds writes:
>
> > See? WE DO NOT DO THIS. I told people we needed to do this _years_ ago. I
> > tried to push through the two-phase suspend. I tried to explain why. I
> > clearly failed, because we do _nothing_of_the_sort_ right now.
>
> We have had working suspend-to-ram on powerbooks since 1998, and we
> have always done a two-phase suspend. We have been as unsuccessful
> as you at convincing people on the PC side that two-phase suspend is
> good. :-P Hopefully we'll get further this time.

Well, we didn't do _that_ sort of 2 phase suspend... again we can't
separate saving state and suspending for all the reasons I just
explained to Linus (and I can do it again, I know the problem well and
while I would love to be convinced it's possible, I yet have to be
proven wrong).

What we did was to have a first phase called "prepare" suspend which was
about informing drivers that things like GFP_KERNEL memory allocations
were not possible any more, etc... that sort of thing (discussed in
another mail I sent today). It allows driver that needed to allocate
large amount of memory for example to do so before the suspend "dance"
starts and the swap device goes offline.

This is a completely different issue.

Ben.