Bug 170515 - Kill any WebContent process using over 16 GB of memory.
Summary: Kill any WebContent process using over 16 GB of memory.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: InRadar, Performance
Depends on:
Blocks:
 
Reported: 2017-04-05 12:22 PDT by Andreas Kling
Modified: 2017-04-06 13:18 PDT (History)
8 users (show)

See Also:


Attachments
Patch (8.49 KB, patch)
2017-04-05 12:52 PDT, Andreas Kling
koivisto: review+
Details | Formatted Diff | Diff
Patch for landing (8.52 KB, patch)
2017-04-06 12:38 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2017-04-05 12:22:18 PDT
If you go over 16 GB, I don't care if you're "active", what are you even doing. Time to die.

<rdar://problem/29930931>
Comment 1 Andreas Kling 2017-04-05 12:52:30 PDT
Created attachment 306302 [details]
Patch
Comment 2 Alexey Proskuryakov 2017-04-05 19:36:51 PDT
16 GB should be enough for everyone.
Comment 3 Antti Koivisto 2017-04-06 03:32:11 PDT
Comment on attachment 306302 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=306302&action=review

> Source/WTF/wtf/MemoryPressureHandler.cpp:112
> -void MemoryPressureHandler::measurementTimerFired()
> +void MemoryPressureHandler::shrinkOrDie()

Nice, this is now much more readable.
Comment 4 Antti Koivisto 2017-04-06 03:59:07 PDT
I think we should have tests for the memory policy. You could add internals APIs to simulate the condition and log the kill/pressure events (but not actually kill anything).
Comment 5 Andreas Kling 2017-04-06 11:35:51 PDT
(In reply to Antti Koivisto from comment #4)
> I think we should have tests for the memory policy. You could add internals
> APIs to simulate the condition and log the kill/pressure events (but not
> actually kill anything).

Absolutely. Filed bug 170558 for that.
Comment 6 Andreas Kling 2017-04-06 12:38:13 PDT
Created attachment 306410 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2017-04-06 13:18:56 PDT
Comment on attachment 306410 [details]
Patch for landing

Clearing flags on attachment: 306410

Committed r215055: <http://trac.webkit.org/changeset/215055>
Comment 8 WebKit Commit Bot 2017-04-06 13:18:57 PDT
All reviewed patches have been landed.  Closing bug.