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

From: David Lang
Date: Wed Apr 25 2007 - 20:26:55 EST


On Thu, 26 Apr 2007, Pavel Machek wrote:

Now, if the old kernel left DMAs running, it could be overwriting
the data we are copying in.

The *thaw* needs to happen with devices quiescent.

But that sure doesn't have anythign to do with the "snapshot()" path. In
fact, you'll have rebooted the machine in between.

Only the fact that we are currently using same device call during
snapshot() and during restore(). We obviously could do _5_ device
calls

(suspend/resume/freeze/quiesce_disable_dma/thaw)

...but that looks like too many calls to me.

So what does that have to do with "snapshotting"?

I'm not comfortable with memory I'm copying changing under my hands
because of some DMA. It just looks like asking for trouble. I _think_
we can get away with DMA running during snapshot, because driver may
not assume anything about the DMA result before it got completion
interrupt, but...

the key is that with STR you don't need to copy the memory (it's staying where it is)

for STD you need to copy the memory, and there you halt DMA becouse you need to make an atomic snapshot.

David Lang
-
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/