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

Issue 1023153002: Limit rate of full garbage collections triggered by idle notification.

Created:
5 years, 9 months ago by Hannes Payer (out of office)
Modified:
5 years, 9 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Limit rate of full garbage collections triggered by idle notification. Idle notification can trigger a bunch of full garbage collections, especially with the larger idle times of 50ms. We have to limit the rate of these events, since there is no need to get rid of garbage on a high rate. BUG=chromium:468554, chromium:455713 LOG=y

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -53 lines) Patch
M src/heap/gc-idle-time-handler.h View 1 2 3 4 3 chunks +12 lines, -1 line 1 comment Download
M src/heap/gc-idle-time-handler.cc View 1 2 2 chunks +13 lines, -7 lines 2 comments Download
M src/heap/heap.cc View 1 2 3 chunks +6 lines, -2 lines 1 comment Download
M src/heap/mark-compact.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 1 chunk +0 lines, -40 lines 1 comment Download
M test/unittests/heap/gc-idle-time-handler-unittest.cc View 1 2 2 chunks +14 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
Hannes Payer (out of office)
5 years, 9 months ago (2015-03-20 12:35:19 UTC) #2
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1023153002/diff/1/src/heap/gc-idle-time-handler.cc File src/heap/gc-idle-time-handler.cc (right): https://codereview.chromium.org/1023153002/diff/1/src/heap/gc-idle-time-handler.cc#newcode160 src/heap/gc-idle-time-handler.cc:160: last_mark_compact_time + kMinMillisecondsInBetweenMarkCompact; you're adding seconds + milliseconds here ...
5 years, 9 months ago (2015-03-20 12:41:53 UTC) #3
Hannes Payer (out of office)
https://codereview.chromium.org/1023153002/diff/1/src/heap/gc-idle-time-handler.cc File src/heap/gc-idle-time-handler.cc (right): https://codereview.chromium.org/1023153002/diff/1/src/heap/gc-idle-time-handler.cc#newcode160 src/heap/gc-idle-time-handler.cc:160: last_mark_compact_time + kMinMillisecondsInBetweenMarkCompact; On 2015/03/20 12:41:52, jochen (slow) wrote: ...
5 years, 9 months ago (2015-03-20 14:20:39 UTC) #4
jochen (gone - plz use gerrit)
lgtm just to clarify, if the system is fully idle, we'll attempt a MC every ...
5 years, 9 months ago (2015-03-20 14:52:10 UTC) #5
rmcilroy
looks good overall - couple of questions though. https://codereview.chromium.org/1023153002/diff/80001/src/heap/gc-idle-time-handler.cc File src/heap/gc-idle-time-handler.cc (right): https://codereview.chromium.org/1023153002/diff/80001/src/heap/gc-idle-time-handler.cc#newcode162 src/heap/gc-idle-time-handler.cc:162: EstimateMarkCompactTime(size_of_objects, ...
5 years, 9 months ago (2015-03-20 14:56:08 UTC) #6
Erik Corry
In terms of testability it's not great to add more time-based decision making. It would ...
5 years, 9 months ago (2015-03-20 15:21:28 UTC) #8
Erik Corry
I think we'll take another look at it Monday. One idea is to add up ...
5 years, 9 months ago (2015-03-20 15:45:45 UTC) #9
Hannes Payer (out of office)
5 years, 9 months ago (2015-03-20 20:02:45 UTC) #10
I agree, this is getting too complicated. We should have something simple
(modulo the unfortunate hack).

The system should serve two purposes:
1) Perform garbage collection during idle time when we are close to a full new
or old generation.
2) Reduce memory footprint.

1) is easy and very natural.
2) is right now really arbitrary and leads to the mess we are having. Right now
we assume that we are always in memory reduction situation which is wrong. We
should just be in this mode when it is really needed. Let's find a good signal
for that.

Powered by Google App Engine
This is Rietveld 408576698