Bug 152362 - Give kernel VM some hints about non-live memory-cached resources.
Summary: Give kernel VM some hints about non-live memory-cached resources.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2015-12-16 15:04 PST by Andreas Kling
Modified: 2015-12-16 18:55 PST (History)
7 users (show)

See Also:


Attachments
Patch (6.24 KB, patch)
2015-12-16 15:05 PST, Andreas Kling
ggaren: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-yosemite (852.81 KB, application/zip)
2015-12-16 16:14 PST, Build Bot
no flags Details
Patch for landing (6.25 KB, patch)
2015-12-16 16:41 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Patch for landing (6.74 KB, patch)
2015-12-16 17:36 PST, Andreas Kling
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (6.74 KB, patch)
2015-12-16 17:59 PST, 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 2015-12-16 15:04:47 PST
We could improve our Good Citizen Score(tm) on the system by letting the kernel know that it's OK to reclaim clean file-backed pages for memory-cached resources that are not currently in use.

They would eventually get reclaimed anyway, but this patch will be about nudging them to the head of the eviction queue through madvise(MADV_DONTNEED).
Comment 1 Andreas Kling 2015-12-16 15:05:52 PST
Created attachment 267496 [details]
Patch
Comment 2 Geoffrey Garen 2015-12-16 15:32:52 PST
Comment on attachment 267496 [details]
Patch

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

> Source/WebCore/platform/cf/SharedBufferCF.cpp:81
> +    OSAllocator::hintMemoryNotNeededSoon((void*)platformData(), platformDataSize());

I don't think you need a cast here? If you do need one, static_cast please.
Comment 3 Build Bot 2015-12-16 16:14:34 PST
Comment on attachment 267496 [details]
Patch

Attachment 267496 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/568817

New failing tests:
imported/w3c/web-platform-tests/streams-api/readable-streams/garbage-collection.html
Comment 4 Build Bot 2015-12-16 16:14:38 PST
Created attachment 267507 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Andreas Kling 2015-12-16 16:41:55 PST
Created attachment 267510 [details]
Patch for landing
Comment 6 Andreas Kling 2015-12-16 17:36:30 PST
Created attachment 267513 [details]
Patch for landing

With Windows fixed.
Comment 7 WebKit Commit Bot 2015-12-16 17:37:51 PST
Comment on attachment 267513 [details]
Patch for landing

Rejecting attachment 267513 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 267513, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Geoff Garen found in /Volumes/Data/EWS/WebKit/Source/WTF/ChangeLog does not appear to be a valid reviewer according to contributors.json.
/Volumes/Data/EWS/WebKit/Source/WTF/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-queues.webkit.org/results/569195
Comment 8 Andreas Kling 2015-12-16 17:59:03 PST
Created attachment 267515 [details]
Patch for landing

s/Geoff/Geoffrey/ :|
Comment 9 WebKit Commit Bot 2015-12-16 18:55:29 PST
Comment on attachment 267515 [details]
Patch for landing

Clearing flags on attachment: 267515

Committed r194204: <http://trac.webkit.org/changeset/194204>
Comment 10 WebKit Commit Bot 2015-12-16 18:55:35 PST
All reviewed patches have been landed.  Closing bug.