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

Issue 711173004: Oilpan: Try to allocate from a smaller FreeListEntry. (Closed)

Created:
6 years, 1 month ago by tkent
Modified:
6 years, 1 month ago
Reviewers:
oilpan-reviews, haraken, sof
CC:
blink-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Project:
blink
Visibility:
Public.

Description

Oilpan: Try to allocate from a smaller FreeListEntry. PerformanceTests/ShadowDOM/LargeDistributionWithoutLayout allocates a lot of collection backings with 32KB size and 16KB size. allocateFromFreeList failed to allocate memory for them frequently even if there were FreeListEntry with enough sizes because: - Actual required size is 32KB+8B or 16KB+8B because of object headers - allocateFromFreeList only checked the minimum size of a bucket. For example, a 32KB+8B free slot was listed in the 32KB bucket, and 32KB is smaller than 32KB+8B. This CL reduces the peak number of HeapPages in LargeDistributionWithoutLayout test by 200. BUG=420515 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185112

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M Source/platform/heap/Heap.cpp View 1 chunk +7 lines, -2 lines 2 comments Download

Messages

Total messages: 19 (4 generated)
tkent
Please review this.
6 years, 1 month ago (2014-11-11 06:21:35 UTC) #3
haraken
LGTM
6 years, 1 month ago (2014-11-11 06:29:15 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/711173004/20001
6 years, 1 month ago (2014-11-11 07:53:57 UTC) #6
sof
https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp#newcode748 Source/platform/heap/Heap.cpp:748: m_freeList.m_biggestFreeListIndex = i; I don't understand m_biggestFreeListIndex and this ...
6 years, 1 month ago (2014-11-11 08:29:36 UTC) #8
tkent
https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp File Source/platform/heap/Heap.cpp (right): https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp#newcode748 Source/platform/heap/Heap.cpp:748: m_freeList.m_biggestFreeListIndex = i; On 2014/11/11 08:29:36, sof wrote: > ...
6 years, 1 month ago (2014-11-11 08:46:59 UTC) #9
sof
On 2014/11/11 08:46:59, tkent wrote: > https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp > File Source/platform/heap/Heap.cpp (right): > > https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp#newcode748 > ...
6 years, 1 month ago (2014-11-11 08:55:34 UTC) #10
haraken
On 2014/11/11 08:55:34, sof wrote: > On 2014/11/11 08:46:59, tkent wrote: > > > https://codereview.chromium.org/711173004/diff/20001/Source/platform/heap/Heap.cpp ...
6 years, 1 month ago (2014-11-11 08:59:41 UTC) #11
tkent
On 2014/11/11 08:55:34, sof wrote: > > We always allocate from a FreeListEntry in the ...
6 years, 1 month ago (2014-11-11 09:05:38 UTC) #12
haraken
On 2014/11/11 09:05:38, tkent wrote: > On 2014/11/11 08:55:34, sof wrote: > > > We ...
6 years, 1 month ago (2014-11-11 09:12:43 UTC) #13
sof
On 2014/11/11 09:12:43, haraken wrote: > On 2014/11/11 09:05:38, tkent wrote: > > On 2014/11/11 ...
6 years, 1 month ago (2014-11-11 09:22:55 UTC) #14
commit-bot: I haz the power
Committed patchset #1 (id:20001) as 185112
6 years, 1 month ago (2014-11-11 09:56:07 UTC) #15
blink-reviews
Worst-fit works best for lots of small allocations of objects that tend to live and ...
6 years, 1 month ago (2014-11-11 11:35:53 UTC) #16
haraken
On 2014/11/11 11:35:53, blink-reviews wrote: > Worst-fit works best for lots of small allocations of ...
6 years, 1 month ago (2014-11-11 12:58:22 UTC) #17
tkent
FYI. This CL improved LargeDistributionWithoutLayout test. 39% worse than non-Oilpan -> 31% worse than non-Oilpan ...
6 years, 1 month ago (2014-11-12 01:08:29 UTC) #18
haraken
6 years, 1 month ago (2014-11-12 01:40:50 UTC) #19
Message was sent while issue was closed.
On 2014/11/12 01:08:29, tkent wrote:
> FYI. This CL improved LargeDistributionWithoutLayout test.
> 39% worse than non-Oilpan -> 31% worse than non-Oilpan
> on Mac.
> 
> 
> On 2014/11/11 12:58:22, haraken wrote:
> > FWIW, previously I tried to implement per-size heaps for collection backings
> > (i.e., a heap for < 64 bytes, a heap for < 128 bytes, a heap for < 256 bytes
> and
> > a heap for >= 256 bytes). It regressed performance :(
> 
> It's interesting.  I thought it would have improvement.

Yeah, that's why I landed the per-size heap only for GeneralHeaps. I think we
need more investigation on collection backing heaps.

Powered by Google App Engine
This is Rietveld 408576698