mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-20 20:00:28 +00:00
8257974: Regression 21% in DaCapo-lusearch-large after JDK-8236926
Reviewed-by: ayang, redestad, tschatzl
This commit is contained in:
parent
7afb01dce9
commit
38593a4f2a
@ -59,9 +59,9 @@ void G1UncommitRegionTask::enqueue() {
|
||||
|
||||
G1UncommitRegionTask* uncommit_task = instance();
|
||||
if (!uncommit_task->is_active()) {
|
||||
// Change state to active and schedule with no delay.
|
||||
// Change state to active and schedule using UncommitInitialDelayMs.
|
||||
uncommit_task->set_active(true);
|
||||
G1CollectedHeap::heap()->service_thread()->schedule_task(uncommit_task, 0);
|
||||
G1CollectedHeap::heap()->service_thread()->schedule_task(uncommit_task, UncommitInitialDelayMs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -124,9 +124,8 @@ void G1UncommitRegionTask::execute() {
|
||||
// Reschedule if there are more regions to uncommit, otherwise
|
||||
// change state to inactive.
|
||||
if (g1h->has_uncommittable_regions()) {
|
||||
// No delay, reason to reschedule rather then to loop is to allow
|
||||
// other tasks to run without waiting for a full uncommit cycle.
|
||||
schedule(0);
|
||||
// Delay to avoid starving application.
|
||||
schedule(UncommitTaskDelayMs);
|
||||
} else {
|
||||
// Nothing more to do, change state and report a summary.
|
||||
set_active(false);
|
||||
|
||||
@ -30,10 +30,14 @@
|
||||
#include "utilities/ticks.hpp"
|
||||
|
||||
class G1UncommitRegionTask : public G1ServiceTask {
|
||||
// Each execution of the uncommit task is limited to uncommit at most 256M.
|
||||
// Each execution of the uncommit task is limited to uncommit at most 128M.
|
||||
// This limit is small enough to ensure that the duration of each invocation
|
||||
// is short, while still making reasonable progress.
|
||||
static const uint UncommitSizeLimit = 256 * M;
|
||||
static const uint UncommitSizeLimit = 128 * M;
|
||||
// Initial delay in milliseconds after GC before the regions are uncommitted.
|
||||
static const uint UncommitInitialDelayMs = 100;
|
||||
// The delay between two uncommit task executions.
|
||||
static const uint UncommitTaskDelayMs = 10;
|
||||
|
||||
static G1UncommitRegionTask* _instance;
|
||||
static void initialize();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user