-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[flatland] Handle fence overflow in flatland_connection.cc #53366
Conversation
066b1a3
to
5cac8fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @filmil!
4fee0e0
to
ddbffb0
Compare
@uysalere PTAL - I merged the code of |
45f0f34
to
2da2d1e
Compare
2da2d1e
to
4c0c89f
Compare
flatland_connection.cc used to allow an arbitrary number of acquire and release fences to be scheduled for each frame. Sadly, Fuchsia has a limitation of (1) the number of total handles that can be sent per a FIDL call, but also (2) the Flatland protocol only supports sending up to 16 fences per each fence type. Now, normally there should be very few scheduled fences per frame. But if frames get skipped, we could amass many fences which would then crash our attempts to send all of them to the Flatland `Present` endpoint. This change introduces two fence multiplexer, which allow us to signal more than 16 fences per type, at a performance penalty. We expect to be able *not* to crash the FIDL subsystem using this approach, and may even be able to hobble along for a bit, until the fences issue is hopefully self-resolved. That said, this issue seems to indicate there are frame scheduling problems elsewhere. But this is a fairly straightforward change to make without affecting the rest of the flatland code or integration, so we opt to do that first. Issue: #150136
4c0c89f
to
acca647
Compare
@chinmaygarde Can you merge this for me? I am not a Flutter committer. Thanks! |
Happy to endorse. Your call. go/flutter-onboarding. |
I don't think I'm at a point where flutter onboarding makes sense for me. Thanks for the pointer, however. |
…150399) flutter/engine@a4f266f...1c4e5e2 2024-06-17 flar@google.com [DisplayList] Create DrawDashedLine for paragraph code (flutter/engine#53411) 2024-06-17 chinmaygarde@google.com [Impeller] Update Android CPU profiling instructions. (flutter/engine#53437) 2024-06-17 jonahwilliams@google.com [Impeller] move draw vertices to dl unittests. (flutter/engine#53400) 2024-06-17 chinmaygarde@google.com [Impeller] Link CPU profiling docs from the main README. (flutter/engine#53435) 2024-06-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 1ce6b4d54247 to 51bbba0da7d3 (1 revision) (flutter/engine#53432) 2024-06-17 jonahwilliams@google.com [Impeller] Move drawAtlas golden tests to display list. (flutter/engine#53398) 2024-06-17 fmil@google.com [flatland] Handle fence overflow in flatland_connection.cc (flutter/engine#53366) 2024-06-17 skia-flutter-autoroll@skia.org Roll Skia from 0dda1054f543 to 2b9bc16df969 (1 revision) (flutter/engine#53431) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flatland_connection.cc used to allow an arbitrary number of acquire and release fences to be scheduled for each frame.
Sadly, Fuchsia has a limitation of (1) the number of total handles that can be sent per a FIDL call, but also (2) the Flatland protocol only supports sending up to 16 fences per each fence type.
Now, normally there should be very few scheduled fences per frame. But if frames get skipped, we could amass many fences which would then crash our attempts to send all of them to the Flatland
Present
endpoint.This change introduces two fence multiplexer, which allow us to signal more than 16 fences per type, at a performance penalty. We expect to be able not to crash the FIDL subsystem using this approach, and may even be able to hobble along for a bit, until the fences issue is hopefully self-resolved.
That said, this issue seems to indicate there are frame scheduling problems elsewhere. But this is a fairly straightforward change to make without affecting the rest of the flatland code or integration, so we opt to do that first.
Issues: #150136
Pre-launch Checklist
///
).