Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Issue 133863006: PartitionAlloc: wait just a little while before actually freeing empty pages. (Closed)

Created:
6 years, 11 months ago by Chris Evans
Modified:
6 years, 11 months ago
Reviewers:
Tom Sepez
CC:
blink-reviews, yurys+blink_chromium.org, loislo+blink_chromium.org, adamk+blink_chromium.org, Inactive, abarth-chromium
Visibility:
Public.

Description

PartitionAlloc: wait just a little while before actually freeing empty pages. We hold a small ring-list cache of recently-emptied pages, and only free the oldest entry in the ring list when the cache is full. This makes us hold on to a little bit of unused memory, but in return we do now eventually free the last slot span in any given bucket, which would have been held indefinitely before. This patch is a sufficient generic replacement for the bandaid added in https://code.google.com/p/chromium/issues/detail?id=330798; accordingly, the bandaid is removed. In fact, we now seem to be +4% faster than _before_ the original regression. BUG=332282 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165112

Patch Set 1 #

Total comments: 1

Patch Set 2 : Review. #

Total comments: 3

Patch Set 3 : Review. #

Patch Set 4 : Review. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -37 lines) Patch
M Source/wtf/PartitionAlloc.h View 1 2 3 4 chunks +6 lines, -1 line 0 comments Download
M Source/wtf/PartitionAlloc.cpp View 1 2 3 8 chunks +57 lines, -24 lines 0 comments Download
M Source/wtf/PartitionAllocTest.cpp View 1 2 3 8 chunks +70 lines, -12 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Chris Evans
Ok, I think this is the simple key to getting the remainder landed again.
6 years, 11 months ago (2014-01-14 22:05:23 UTC) #1
Tom Sepez
There's probably a simpler LRU scheme where you only need one index: 1. if there's ...
6 years, 11 months ago (2014-01-14 22:17:10 UTC) #2
Chris Evans
On 2014/01/14 22:17:10, Tom Sepez wrote: > There's probably a simpler LRU scheme where you ...
6 years, 11 months ago (2014-01-14 22:57:39 UTC) #3
Tom Sepez
https://codereview.chromium.org/133863006/diff/70001/Source/wtf/PartitionAlloc.cpp File Source/wtf/PartitionAlloc.cpp (right): https://codereview.chromium.org/133863006/diff/70001/Source/wtf/PartitionAlloc.cpp#newcode606 Source/wtf/PartitionAlloc.cpp:606: ASSERT(!pageToFree || pageToFree == root->globalEmptyPageRing[pageToFree->freeCacheIndex - 1]); nit: mabye ...
6 years, 11 months ago (2014-01-14 23:08:46 UTC) #4
Chris Evans
On 2014/01/14 23:08:46, Tom Sepez wrote: > https://codereview.chromium.org/133863006/diff/70001/Source/wtf/PartitionAlloc.cpp > File Source/wtf/PartitionAlloc.cpp (right): > > https://codereview.chromium.org/133863006/diff/70001/Source/wtf/PartitionAlloc.cpp#newcode606 ...
6 years, 11 months ago (2014-01-14 23:15:10 UTC) #5
Tom Sepez
lgtm
6 years, 11 months ago (2014-01-14 23:25:49 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cevans@chromium.org/133863006/200001
6 years, 11 months ago (2014-01-14 23:40:33 UTC) #7
commit-bot: I haz the power
6 years, 11 months ago (2014-01-15 09:46:10 UTC) #8
Message was sent while issue was closed.
Change committed as 165112

Powered by Google App Engine
This is Rietveld 408576698