Reland "*Scan: Disable *Scan if any of renderers is loading"
The browser hangs are fixed now by crrev.com/c/3116252. In addition, this reland makes sure that the rescheduling callback is not called under the scheduler lock in MUAwareTaskBasedBackend::NeedsToImmediatelyScan() (as otherwise this can result in a deadlock if the callback frees anything). For sheriffs: please note that the CL might cause hangs. We are not aware of any though. Original change's description: > *Scan: Disable *Scan if any of renderers is loading > > In scenarios when a renderer loads a page while *Scan is actively > scanning the browser heap, it can happen that *Scan takes away all the > machine cores. This slows down page loading and causes some metrics to > regress ("First Input Delay", "Time to First Contentful Paint", etc). > > This CL introduces StarScanLoadObserver that listens to load changes in > each WebContents using WebContentsObserver API. In case any of the > WebContents has renderers that are loading a new document, *Scan in the > browser process temporarily disables *Scan until all the renderers > finish loading. > > This (intrusive) change is a temporary experiment. Ideally the jobs API > would be used for scanning tasks, however, due to the cyclic dependency > between the allocator and the scheduler, it's not trivial to switch to > jobs API. The bug 1231679 aims to reevaluate the entire approach. > > Bug: 11297512,1231679 > Change-Id: Idc75a9d4a8f8bc608cc0934f43948582c0457cd8 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3015346 > Commit-Queue: Anton Bikineev <bikineev@chromium.org> > Reviewed-by:Charlie Reis <creis@chromium.org> > Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> > Reviewed-by:
Łukasz Anforowicz <lukasza@chromium.org> > Reviewed-by:
Kentaro Hara <haraken@chromium.org> > Cr-Commit-Position: refs/heads/master@{#906310} > Bug: 11297512,1231679 Change-Id: I46086caa28a57dd330511d38c129efed660ccc14 Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3114291 Auto-Submit: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Kentaro Hara <haraken@chromium.org> Reviewed-by:
Charlie Reis <creis@chromium.org> Cr-Commit-Position: refs/heads/main@{#915104}
Loading
Please register or sign in to comment