Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
8-shenandoah, 11-shenandoah, 14, 15
-
b19
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8245365 | 14u-cpu | Aleksey Shipilev | P4 | Resolved | Fixed | master |
JDK-8244690 | 14.0.2 | Aleksey Shipilev | P4 | Resolved | Fixed | b06 |
Description
Current code does:
void ShenandoahHeap::ref_processing_init() {
assert(_max_workers > 0, "Sanity");
_ref_processor =
new ReferenceProcessor(&_subject_to_discovery, // is_subject_to_discovery
ParallelRefProcEnabled, // MT processing
_max_workers, // Degree of MT processing
true, // MT discovery
_max_workers, // Degree of MT discovery
false, // Reference discovery is not atomic
NULL, // No closure, should be installed before use
true); // Scale worker threads
shenandoah_assert_rp_isalive_not_installed();
}
...and:
if (FLAG_IS_DEFAULT(ParallelRefProcEnabled)) {
FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
}
...so it always runs with parallel reference processing, even when -XX:ParallelGCThreads=1. This probably penalizes the single-threaded containers. Shenandoah should use single-threaded RP when that happens. Look for a relevant block in G1 code.
void ShenandoahHeap::ref_processing_init() {
assert(_max_workers > 0, "Sanity");
_ref_processor =
new ReferenceProcessor(&_subject_to_discovery, // is_subject_to_discovery
ParallelRefProcEnabled, // MT processing
_max_workers, // Degree of MT processing
true, // MT discovery
_max_workers, // Degree of MT discovery
false, // Reference discovery is not atomic
NULL, // No closure, should be installed before use
true); // Scale worker threads
shenandoah_assert_rp_isalive_not_installed();
}
...and:
if (FLAG_IS_DEFAULT(ParallelRefProcEnabled)) {
FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
}
...so it always runs with parallel reference processing, even when -XX:ParallelGCThreads=1. This probably penalizes the single-threaded containers. Shenandoah should use single-threaded RP when that happens. Look for a relevant block in G1 code.
Attachments
Issue Links
- backported by
-
JDK-8244690 Shenandoah: should not use parallel reference processing with single GC thread
- Resolved
-
JDK-8245365 Shenandoah: should not use parallel reference processing with single GC thread
- Resolved