Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8)

From: Alan Stern
Date: Thu May 27 2010 - 13:00:44 EST


On Thu, 27 May 2010, Thomas Gleixner wrote:

> The whole notion of treating suspend to RAM any different than a plain
> idle C-State is wrong. It's not different at all. You just use a
> different mechanism which has longer takedown and wakeup latencies and
> requires to shut down stuff and setup extra wakeup sources.

This is where you are wrong. Maybe not wrong in principle, but wrong
in practice -- the kernel's present suspend-to-RAM (or just "suspend")
implementation is _very_ different from C-states (or just "idle").

The primary difference is that the kernel can be forced into suspend
even when the system isn't idle. In particular, it may be in the
middle of processing a potential wakeup event -- and the current design
gives the PM core no way to know if that is so. This is a weakness
that in-kernel suspend blockers fix.

With C-states this can't happen. If the CPU goes into a deeper C-state
then ipso facto it isn't busy processing anything, much less a wakeup
event.

Now maybe this difference is a bad thing, and the whole PM
suspend/hibernate infrastructure should be rewritten. But the fact,
remains, that's how it works now. And it can't be changed easily or
quickly.

Alan Stern

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