-
Mugdha Lakhani authored
Before this chance, we were calculating the soonest wakeup_delta across all storage partitions every time there was a change in state of any storage partition, to schedule a wakeup task with this delta. This change builds on the fact that we have running timers representing delays for each of the storage partitions with active registrations in the scheduler. I've changed scheduling the wakeup task to a push system. Each storage partition informs the scheduler of its soonest delay after there's any change in state. If this requested delay is the smallest of all the current delays of the timers the scheduler has, it schedules a wakeup task. Canceling delayed scheduling causes cancellation of the wakeup task if none of the storage partitions need it. The change also removes now unnecessary code. Unit tests are also added, and integration tests updated. Bug: 996166 Change-Id: I1e6216ecc7085535a8e0ca0075ddad05085df763 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1834086 Commit-Queue: Mugdha Lakhani <nator@chromium.org> Reviewed-by:
David Trainor <dtrainor@chromium.org> Reviewed-by:
Avi Drissman <avi@chromium.org> Reviewed-by:
Rayan Kanso <rayankans@chromium.org> Auto-Submit: Mugdha Lakhani <nator@chromium.org> Cr-Commit-Position: refs/heads/master@{#715262}
eb39fc23