Re: suspend2 merge (was Re: [Suspend2-devel] Re: CFS and suspend2: hang in atomic copy)

Linus Torvalds
2007-04-26T01:11:58Z

On Thu, 26 Apr 2007, Alan Cox wrote:
>
> You bet there is. We need to know if data arrived or not, because there
> is no guarantee that the data retrieved if we inadvertently re-execute a
> command will be the same. The hardware state itself isn't the problem,
> its the combination of hardware state and internal state which need to
> match in some cases.

... which is why "suspend()" suspends the hardware.

Is that so hard to understand?

Once the hardware is suspended, it's not doing anything.

But STR doesn't have any need for atomicity guarantees _between_devices_.

That's a really *fundamental* difference.

The reason s2ram is *so* different from snapshot-to-disk is exactly the
fact that s2ram can (and does) work on one device at a time.

In contrast, snapshot-to-disk needs to snapshot all the devices
*together*, since it has a separate disk image.

See? Two *totally* different cases. They have *nothing* in common. Not the
call sequence, not the logic, not *anything*.

Linus