Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuchsia Message Loop implementation is susceptible to idle wakes. #49330

Open
chinmaygarde opened this issue Jan 23, 2020 · 0 comments
Open

Fuchsia Message Loop implementation is susceptible to idle wakes. #49330

chinmaygarde opened this issue Jan 23, 2020 · 0 comments
Labels
customer: fuchsia engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list team-engine Owned by Engine team triaged-engine Triaged by Engine team

Comments

@chinmaygarde
Copy link
Member

This is being temporarily reverted in flutter/engine#15903. Once the underlying issue (described below) is patched, this patch can be re-landed. The original regression was introduced in flutter/engine#14007.

The message loop implementations may be asked to wake up multiple times at various points in the future. When the implementation is asked to wake up the thread at the new time-point, the previous request must be disregarded. Once the time-point it reached, the implementation must call RunExpiredTasksNow. In the reverted patch, the Fuchsia implementation was scheduling a task to be run in the future for each call to MessageLoopImpl::WakeUp. This did not take into account disregarding the previous requests. Other platforms use timer file descriptors that are continuously re-armed to implement this functionality. In the absence of this mechanism on Fuchsia, for each task posted to the target message loop (potentially many thousands), the message loop would wake up and end up doing no work. This would eventually cause CPU usage to spike and cause actual work to be deferred.

@chinmaygarde chinmaygarde added customer: fuchsia engine flutter/engine repository. See also e: labels. labels Jan 23, 2020
@kf6gpe kf6gpe added the P2 Important issues not at the top of the work list label Jun 8, 2020
@flutter-triage-bot flutter-triage-bot bot added team-engine Owned by Engine team triaged-engine Triaged by Engine team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer: fuchsia engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list team-engine Owned by Engine team triaged-engine Triaged by Engine team
Projects
None yet
Development

No branches or pull requests

2 participants