Re: suspend2 with smp

From: Nigel Cunningham
Date: Thu Aug 12 2004 - 17:31:45 EST


Hi.

On Fri, 2004-08-13 at 07:56, Pavel Machek wrote:
> Hi!
>
> At some point I claimed that SMP support in suspend2 is "probably
> broken". I guess I should post more data:
>
> It is broken in theory.
>
> CPU is basically looping in loop marked by #, while its memory is
> being overwriten. Now, the code probably works in practice, but it
> should be really written in assembly so that compiler can not do
> something stupid.
>
> Compilers are not designed to deal with their stack (etc) randomly
> overwritten, so compiler may do anything it wants here. I see that -O0
> may help a lot here, but it simply is not the right thing to do.
>
> At least /* FIXME: should be rewritten to assembly */ should be added there.

Ah, okay. So it's not that the code itself broken, but that you don't
trust the assembler to do the right thing with the code. I'll happily
include an inline asm routine if you'll code it for me (I don't know x86
assembly). In case I haven't said it already, feel free to take the
freezer changes and put them in your code. I'd only be submitting a
patch to do the same anyway.

Nigel
--
Nigel Cunningham
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

Many today claim to be tolerant. But true tolerance can cope with others
being intolerant.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/