session_manager: Don't write policy to disk at shutdown |
|||||||||||
Issue descriptionsession_manager writes policy to disk upon shutdown. (Look for "Persisted policy to disk." log messages.) These writes are unnecessary (policy is written already when it is received) and slow (using fsync()). This is slowing down Chrome OS shutdown and should be removed.
,
Jul 11 2017
,
Jul 14 2017
,
Aug 11 2017
,
Sep 7 2017
That will also reduce unenrollement when we have a fs corruption, if the policy is not updated while the corruption happens.
,
Sep 11 2017
I think this should mitigate Issue 760007 Add merge request.
,
Sep 11 2017
This bug requires manual review: Request affecting a post-stable build Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), ketakid@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 11 2017
This actually already in M61 Change tag to just 60. The CL is here https://chromium-review.googlesource.com/c/chromiumos/platform2/+/567510
,
Sep 11 2017
Approved for M60
,
Sep 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/2c31d5d9edcbdf3434a41b776e29128b1570aab0 commit 2c31d5d9edcbdf3434a41b776e29128b1570aab0 Author: Igor <igorcov@chromium.org> Date: Fri Jul 14 02:46:19 2017 login: Avoid persisting policy data when no change detected. When device is shut down, SessionManagerImpl::Finalize is called as the session is destroyed. The method calls PolicyStore::Persist to save the policy data. In this CL the policy data is cached and is persisted to disk only in case the data is changed. This doesn't avoid persisting when policy fetch is done because the timestamp is included in the data, but allows to avoid the writing to disk at shut down. BUG= chromium:741019 TEST=Manual Change-Id: Idde3cb666fe6e18b778dad4b5d732c88d32d4fac Reviewed-on: https://chromium-review.googlesource.com/567510 Commit-Ready: Igor <igorcov@chromium.org> Tested-by: Igor <igorcov@chromium.org> Reviewed-by: Thiemo Nagel <tnagel@chromium.org> [modify] https://crrev.com/2c31d5d9edcbdf3434a41b776e29128b1570aab0/login_manager/policy_service.cc [modify] https://crrev.com/2c31d5d9edcbdf3434a41b776e29128b1570aab0/login_manager/policy_store.h [modify] https://crrev.com/2c31d5d9edcbdf3434a41b776e29128b1570aab0/login_manager/policy_store.cc
,
Sep 11 2017
,
Sep 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/2e5303c448021b96bf4b281524194339e401c4a7 commit 2e5303c448021b96bf4b281524194339e401c4a7 Author: Igor <igorcov@chromium.org> Date: Mon Sep 11 18:06:19 2017 login: Avoid persisting policy data when no change detected. When device is shut down, SessionManagerImpl::Finalize is called as the session is destroyed. The method calls PolicyStore::Persist to save the policy data. In this CL the policy data is cached and is persisted to disk only in case the data is changed. This doesn't avoid persisting when policy fetch is done because the timestamp is included in the data, but allows to avoid the writing to disk at shut down. BUG= chromium:741019 TEST=Manual Change-Id: Idde3cb666fe6e18b778dad4b5d732c88d32d4fac Reviewed-on: https://chromium-review.googlesource.com/567510 Commit-Ready: Igor <igorcov@chromium.org> Tested-by: Igor <igorcov@chromium.org> Reviewed-by: Thiemo Nagel <tnagel@chromium.org> (cherry picked from commit 2c31d5d9edcbdf3434a41b776e29128b1570aab0) Reviewed-on: https://chromium-review.googlesource.com/661021 Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org> Commit-Queue: Puthikorn Voravootivat <puthik@chromium.org> Tested-by: Puthikorn Voravootivat <puthik@chromium.org> [modify] https://crrev.com/2e5303c448021b96bf4b281524194339e401c4a7/login_manager/policy_service.cc [modify] https://crrev.com/2e5303c448021b96bf4b281524194339e401c4a7/login_manager/policy_store.h [modify] https://crrev.com/2e5303c448021b96bf4b281524194339e401c4a7/login_manager/policy_store.cc
,
Sep 14 2017
As verified in M60.0.3112.114 9592.94.0 stable caroline, "Persisted policy to disk" was not seen during shutdown event in /var/log/messages. |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by igorcov@chromium.org
, Jul 11 2017Status: Assigned (was: Untriaged)