shill: avoid overlapping suspend and resume actions |
||||||
Issue description
After powerd notifies shill that a suspend is imminent via a SuspendImminent D-Bus signal, shill performs suspend actions, and then upon the completion of these actions, notifies powerd that it's ready to suspend via powerd's SuspendReadiness D-Bus method. Later, powerd notifies that shill a suspend attempt is completed or cancelled via a SuspendDone signal and shill performs resume actions.
However, powerd may notify shill the completion of a suspend attempt before shill reports its readiness to suspend (e.g. when the suspend attempt is cancelled while shill is performing the suspend actions). Currently, shill performs the resume actions before it completes the ongoing suspend actions, which may lead to erroneous behavior (e.g. as observed in b/68670487#comment8)
,
Dec 2 2017
,
Dec 3 2017
Your change meets the bar and is auto-approved for M64. Please go ahead and merge the CL to branch 3282 manually. Please contact milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/aosp/platform/system/connectivity/shill/+/82a48d3e353fdf0e483af04fbafb54544b79f4fe commit 82a48d3e353fdf0e483af04fbafb54544b79f4fe Author: Ben Chan <benchan@chromium.org> Date: Sun Dec 03 04:49:46 2017 shill: defer resume actions until after completion of ongoing suspend actions After powerd notifies shill that a suspend is imminent via a SuspendImminent D-Bus signal, shill performs suspend actions, and then upon the completion of these actions, notifies powerd that it's ready to suspend via powerd's SuspendReadiness D-Bus method. Later, powerd notifies that shill a suspend attempt is completed or cancelled via a SuspendDone signal and shill performs resume actions. However, powerd may notify shill the completion of a suspend attempt before shill reports its readiness to suspend (e.g. when the suspend attempt is cancelled while shill is performing the suspend actions). It's problematic if shill performs the resume actions before it completes the ongoing suspend actions. This CL addresses this problem by deferring the actions taken in response to powerd's SuspendDone signal if shill is still performing suspend actions and hasn't yet reported its readiness to suspend. BUG= chromium:789957 TEST=Run unit tests. TEST=Run network_MobileSuspendResume test on a DUT with a modem. TEST=Manually close the lid of a DUT and then quickly reopen the lid. Verify that shill performs resumes actions after completing suspend actions. Change-Id: I97828c0ff7006816da7bba47a04a67742c269d8c Reviewed-on: https://chromium-review.googlesource.com/800573 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Commit-Ready: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> (cherry picked from commit 38b1bcbca317612854e10f8507e1f01fc11408f1) [modify] https://crrev.com/82a48d3e353fdf0e483af04fbafb54544b79f4fe/power_manager.cc [modify] https://crrev.com/82a48d3e353fdf0e483af04fbafb54544b79f4fe/power_manager.h [modify] https://crrev.com/82a48d3e353fdf0e483af04fbafb54544b79f4fe/power_manager_unittest.cc
,
Dec 3 2017
,
Sep 13
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bugdroid1@chromium.org
, Dec 2 2017