Re: [markgross@thengar.org: [RFC] wake up notifications and suspendblocking (aka more wakelock stuff)]

From: Brian Swetland
Date: Tue Oct 25 2011 - 03:05:54 EST


On Sun, Oct 23, 2011 at 6:50 PM, NeilBrown <neilb@xxxxxxx> wrote:
> But saying "Timeouts are never right" cannot work - unless you mean it in a
> much more restricted sense than I think you mean it.
>
> (I can agree that it is *best* if timeouts never fire - if direct action
> causes the wakeup-source to deactivate long before the timeout. ÂI agree that
> is the best case and probably should be the common case, but I cannot see how
> it can be the only case).

This was our conclusion when originally building the Android wakelock
APIs. Timeouts are undesirable, and whenever we can ensure there's a
clear handoff of "ownership" of a wakeup event, so it's fully
accounted for, that's the preferred way to go. But reality gives us
situations where we can't know with a certainty what woke us up (or we
won't know until some time has passed -- USB resume, etc) and in those
situations, timeouts are the best solution we have. Over time we've
always hoped to have fewer and fewer timeouts, but I'm not certain
that we'll ever reach zero, for non-trivial systems.

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