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

Issue 2872883003: Avoid scanning huge freelists for large enough free blocks. (Closed)

Created:
3 years, 7 months ago by erikcorry
Modified:
3 years, 7 months ago
Reviewers:
kustermann
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Avoid scanning huge freelists for large enough free blocks. The current old-space allocation implementation performs a linear search in a single (potentially *very long*) free list for allocations > 2k. This CL will change this behavior to limit the number of free list entries traversed, falling back to allocate a new page if the maximum number of steps was reached. The new page will be pushed onto the front of the free list, therefore making new allocations go there immediately. For the new tests/standalone/fragmentation_test.dart we - pay around 11-12% increase in memory - to gain a 6x speedup (125x speedup with sweepers disabled) I tried a much more complicated version that had power-of-two buckets for freelist items > 2k. This turned out to regress dart2js and splay for reasons that I could not determine. This version is much simpler and fixes the issue as observed in the bug. Closes #29588 R=kustermann@google.com Committed: https://github.com/dart-lang/sdk/commit/37b320d38133344a69555377155e0e390b434d9c

Patch Set 1 #

Patch Set 2 : Only trigger if issue persists for a while #

Patch Set 3 : Fix small thinko #

Patch Set 4 : Rename test file #

Total comments: 6

Patch Set 5 : Feedback from Martin #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -1 line) Patch
M runtime/vm/freelist.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/freelist.cc View 1 2 3 4 5 chunks +26 lines, -1 line 0 comments Download
A tests/standalone/fragmentation_test.dart View 1 2 3 4 1 chunk +30 lines, -0 lines 0 comments Download
M tests/standalone/standalone.status View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (5 generated)
erikcorry
3 years, 7 months ago (2017-05-09 14:31:51 UTC) #1
kustermann
LGTM - Though I still think a rotation might be worth a try -- to ...
3 years, 7 months ago (2017-05-10 21:39:41 UTC) #6
erikcorry
3 years, 7 months ago (2017-05-11 07:41:57 UTC) #8
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
37b320d38133344a69555377155e0e390b434d9c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698