| Summary: | If an idle GPUProcess doesn't exit under memory pressure because it just launched, check again later | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
| Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | darin, ggaren, kkinnunen, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | 224798 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Chris Dumez
2021-04-20 14:23:38 PDT
Created attachment 426594 [details]
Patch
Comment on attachment 426594 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426594&action=review > Source/WebKit/GPUProcess/GPUProcess.cpp:155 > return true; Should we do m_idleExitTimer.stop() here too? Comment on attachment 426594 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426594&action=review >> Source/WebKit/GPUProcess/GPUProcess.cpp:155 >> return true; > > Should we do m_idleExitTimer.stop() here too? Hmm. In this case, we will end up exiting anyway, but sure, it feels a bit cleaner to stop the timer in this case too. Created attachment 426600 [details]
Patch
Created attachment 426602 [details]
Patch
I made the suggested change. I am asking for review again because I made a significant change. I moved the whole logic from canExitUnderMemoryPressure() to tryExitIfUnused(). It feels much nicer for tryExitIfUnused() to schedule a timer to call tryExitIfUnused() then a simple query function like canExitUnderMemoryPressure(). Committed r276339 (236817@main): <https://commits.webkit.org/236817@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426602 [details]. |