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] Implement thread priorities. #40970

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

eieio
Copy link
Contributor

@eieio eieio commented Apr 6, 2023

Implement thread priorities using the Fuchsia media profile provider API to enable system / product configuration of host threads.

This change helps to address b/275114261.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@eieio
Copy link
Contributor Author

eieio commented Apr 6, 2023

This PR primarily changes Engine::CreateThreadHost, which is tested. However, the changes are only functional on Fuchsia in an environment configured to prioritize the Flutter threads. IIUC, the automated Flutter tests do not provide such an environment. We have adequate coverage in our Fuchsia product tests that utilize this functionality.

Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eieio Can you suggest a reviewer? If not, I can RSLGTM.

Copy link

@studgeek studgeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 based on general approach which we have used in many places for Fuchsia. Needs Flutter-specific review and approval.

@studgeek
Copy link

studgeek commented Apr 6, 2023

@eieio Can you suggest a reviewer? If not, I can RSLGTM.

LGTM very welcome. This is a pretty urgent change for a release blocking bug. Thanks!

@eieio
Copy link
Contributor Author

eieio commented Apr 6, 2023

@eieio Can you suggest a reviewer? If not, I can RSLGTM.

@arbreng provided the guidance internally on where this code should live, but he's out until next week.

Given that and the time constraints and LGTM would be appreciated.

shell/platform/fuchsia/flutter/engine.cc Outdated Show resolved Hide resolved
shell/platform/fuchsia/flutter/engine.cc Outdated Show resolved Hide resolved
@eieio eieio force-pushed the fuchsia-thread-priorities branch from bdcd67c to 5f662c2 Compare April 6, 2023 21:37
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #40970 at sha 5f662c2

@eieio
Copy link
Contributor Author

eieio commented Apr 6, 2023

@flutter-dashboard: I don't believe you. This change only affects thread priorities and in any tests here they should be a no-op entirely.

@eieio eieio force-pushed the fuchsia-thread-priorities branch from 5f662c2 to 60dfaf7 Compare April 6, 2023 23:32
@eieio
Copy link
Contributor Author

eieio commented Apr 6, 2023

Updated based on offline conversation about the platform thread being important to input latency. This final change should be good to go!

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #40970 at sha 60dfaf7

Implement thread priorities using the Fuchsia media profile provider API
to enable system / product configuration of host threads.

Bug: b/275114261
@eieio
Copy link
Contributor Author

eieio commented Apr 7, 2023

Thanks, everyone!

arbreng pushed a commit that referenced this pull request Apr 11, 2023
Implement thread priorities using the Fuchsia media profile provider API
to enable system / product configuration of host threads.

Bug: b/275114261

This is a CP of #40970 with a
couple of changes to .cmx files that no longer exist on master.
zhongwuzw pushed a commit to zhongwuzw/engine that referenced this pull request Apr 14, 2023
[Fuchsia] Implement thread priorities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App needs tests platform-fuchsia will affect goldens
Projects
None yet
5 participants