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

Issue 798293002: Oilpan: attempt first-fit freelist allocation for backing heaps. (Closed)

Created:
6 years ago by sof
Modified:
6 years ago
Reviewers:
oilpan-reviews, haraken
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Oilpan: attempt first-fit freelist allocation for backing heaps. When not being able to bump allocate a vector/hash table's backing storage, try to reuse an entry from the corresponding sized bin, picking the first. Should that fail, fall into allocating the largest chunk available. This freelist allocation scheme has some merit on shadow_dom:LargeDistributionWithoutLayout, improving Linux performance by 27%. R=haraken BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187243

Patch Set 1 #

Patch Set 2 : compile fix #

Total comments: 5

Patch Set 3 : Share more low-level allocation code #

Total comments: 25

Patch Set 4 : Comments + tidying #

Total comments: 24

Patch Set 5 : variable renamings #

Patch Set 6 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -55 lines) Patch
M Source/platform/heap/Heap.h View 1 2 3 4 5 6 chunks +30 lines, -18 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 5 2 chunks +102 lines, -37 lines 0 comments Download

Messages

Total messages: 30 (3 generated)
sof
Been looking at quicklist allocation performance etc, and split out the first-fit sized bin matching ...
6 years ago (2014-12-14 22:23:29 UTC) #2
haraken
> This freelist allocation scheme has some merit on shadow_dom:LargeDistributionWithoutLayout, improving Linux performance by 27%. ...
6 years ago (2014-12-15 02:10:52 UTC) #4
haraken
On 2014/12/15 02:10:52, haraken wrote: > > This freelist allocation scheme has some merit on ...
6 years ago (2014-12-15 03:11:16 UTC) #5
sof
I've added a pair of sheets to https://docs.google.com/spreadsheets/d/1U8QeZsVuAzGARDMHSoj0VnUJAJRjqmFg2phAJUgAoqE/edit?usp=sharing which compares against trunk (no Oilpan), for ...
6 years ago (2014-12-15 06:28:15 UTC) #6
sof
On 2014/12/15 02:10:52, haraken wrote: > > This freelist allocation scheme has some merit on ...
6 years ago (2014-12-15 09:11:54 UTC) #7
haraken
On 2014/12/15 09:11:54, sof wrote: > On 2014/12/15 02:10:52, haraken wrote: > > > This ...
6 years ago (2014-12-15 09:32:52 UTC) #8
sof
On 2014/12/15 09:32:52, haraken wrote: > On 2014/12/15 09:11:54, sof wrote: > > On 2014/12/15 ...
6 years ago (2014-12-15 09:50:29 UTC) #9
sof
https://codereview.chromium.org/798293002/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/20001/Source/platform/heap/Heap.cpp#newcode713 Source/platform/heap/Heap.cpp:713: Address ThreadHeap<Header>::allocateFromFreeListEntry(FreeListEntry* entry, size_t allocationSize, const GCInfo* gcInfo) On ...
6 years ago (2014-12-15 11:00:25 UTC) #10
haraken
Mostly looks good. https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode67 Source/platform/heap/Heap.cpp:67: #define PREFETCH(ptr) _mm_prefetch((char*)(ptr), _MM_HINT_T0) I think ...
6 years ago (2014-12-15 15:42:56 UTC) #11
sof
https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode715 Source/platform/heap/Heap.cpp:715: Address ThreadHeap<Header>::allocateFromFreeListEntry(FreeListEntry* entry, size_t allocationSize, const GCInfo* gcInfo) On ...
6 years ago (2014-12-15 16:25:11 UTC) #12
haraken
https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode737 Source/platform/heap/Heap.cpp:737: int bucket = FreeList<Header>::bucketIndexForSize(allocationSize) + 1; On 2014/12/15 16:25:11, ...
6 years ago (2014-12-15 16:38:18 UTC) #13
sof
https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode748 Source/platform/heap/Heap.cpp:748: // Allocate into the freelist block without disturbing the ...
6 years ago (2014-12-15 16:52:52 UTC) #14
haraken
https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode748 Source/platform/heap/Heap.cpp:748: // Allocate into the freelist block without disturbing the ...
6 years ago (2014-12-15 17:03:32 UTC) #15
sof
On 2014/12/15 17:03:32, haraken wrote: > https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode748 > ...
6 years ago (2014-12-15 18:41:33 UTC) #16
sof
https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode715 Source/platform/heap/Heap.cpp:715: Address ThreadHeap<Header>::allocateFromFreeListEntry(FreeListEntry* entry, size_t allocationSize, const GCInfo* gcInfo) On ...
6 years ago (2014-12-15 21:36:40 UTC) #17
haraken
LGTM https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/40001/Source/platform/heap/Heap.cpp#newcode740 Source/platform/heap/Heap.cpp:740: PREFETCH(entry->address()); On 2014/12/15 21:36:40, sof wrote: > On ...
6 years ago (2014-12-16 02:26:34 UTC) #18
sof
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode707 Source/platform/heap/Heap.cpp:707: static bool shouldUseFirstFitForHeap(int heapIndex) On 2014/12/16 02:26:33, haraken wrote: ...
6 years ago (2014-12-16 07:31:54 UTC) #19
haraken
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode707 Source/platform/heap/Heap.cpp:707: static bool shouldUseFirstFitForHeap(int heapIndex) On 2014/12/16 07:31:54, sof wrote: ...
6 years ago (2014-12-16 08:26:14 UTC) #20
sof
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode707 Source/platform/heap/Heap.cpp:707: static bool shouldUseFirstFitForHeap(int heapIndex) On 2014/12/16 08:26:14, haraken wrote: ...
6 years ago (2014-12-16 08:32:15 UTC) #21
sof
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode717 Source/platform/heap/Heap.cpp:717: // first-fit matching. On 2014/12/16 08:26:14, haraken wrote: > ...
6 years ago (2014-12-16 08:36:19 UTC) #22
haraken
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode707 Source/platform/heap/Heap.cpp:707: static bool shouldUseFirstFitForHeap(int heapIndex) On 2014/12/16 08:32:15, sof wrote: ...
6 years ago (2014-12-16 08:51:19 UTC) #23
sof
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode707 Source/platform/heap/Heap.cpp:707: static bool shouldUseFirstFitForHeap(int heapIndex) On 2014/12/16 08:51:19, haraken wrote: ...
6 years ago (2014-12-16 08:54:22 UTC) #24
haraken
https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/798293002/diff/60001/Source/platform/heap/Heap.cpp#newcode707 Source/platform/heap/Heap.cpp:707: static bool shouldUseFirstFitForHeap(int heapIndex) On 2014/12/16 08:54:22, sof wrote: ...
6 years ago (2014-12-16 09:06:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/798293002/100001
6 years ago (2014-12-16 10:35:23 UTC) #27
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://src.chromium.org/viewvc/blink?view=rev&revision=187243
6 years ago (2014-12-16 11:29:07 UTC) #28
sof
Perfbot confirms improvement, https://chromeperf.appspot.com/report?masters=ChromiumPerf&bots=linux-oilpan-release%2Clinux-release&tests=blink_perf.shadow_dom%2FLargeDistributionWithoutLayout&checked=LargeDistributionWithoutLayout%2Cref%2CLargeDistributionWithoutLayout%2Cref
6 years ago (2014-12-16 19:53:31 UTC) #29
haraken
6 years ago (2014-12-16 23:47:25 UTC) #30
Message was sent while issue was closed.
On 2014/12/16 19:53:31, sof wrote:
> Perfbot confirms improvement,
> 
> 
>
https://chromeperf.appspot.com/report?masters=ChromiumPerf&bots=linux-oilpan-...

Great!

Powered by Google App Engine
This is Rietveld 408576698