Skip to content

Commit

Permalink
Merge pull request #7650 from amicic/tilt_headroom
Browse files Browse the repository at this point in the history
Increase default CS headroom
  • Loading branch information
babsingh authored Feb 11, 2025
2 parents c985548 + 815766c commit dba1460
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions gc/base/GCExtensionsBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,10 @@ class MM_GCExtensionsBase : public MM_BaseVirtual {
bool concurrentScavengerHWSupport; /**< set to true if CS runs with HW support, complimentary to softwareRangeCheckReadBarrier with CS active */
uintptr_t concurrentScavengerBackgroundThreads; /**< number of background GC threads during concurrent phase of Scavenge */
bool concurrentScavengerBackgroundThreadsForced; /**< true if concurrentScavengerBackgroundThreads set via command line option */
uintptr_t concurrentScavengerSlack; /**< amount of bytes added on top of avearge allocated bytes during concurrent cycle, in calcualtion for survivor size */
float concurrentScavengerAllocDeviationBoost; /**< boost factor for allocate rate and its deviation, used for tilt calcuation in Concurrent Scavenger */
bool concurrentScavengeExhaustiveTermination; /**< control flag to enable/disable concurrent phase termination optimization using involing async mutator callbacks */
uintptr_t concurrentScavengerSlack; /**< amount of bytes added on top of average allocated bytes during concurrent cycle, in calculation for survivor size - increase when sudden but rare spikes in allocation are expected */
float concurrentScavengerAllocAverageBoost; /**< boost factor for allocate rate, used for tilt calculation in CS - similar to Slack but expressed in relative rather than absolute terms */
float concurrentScavengerAllocDeviationBoost; /**< boost factor for allocate rate deviation, used for tilt calculation in CS - increase when frequent small deviations in allocation are expected */
bool concurrentScavengeExhaustiveTermination; /**< control flag to enable/disable concurrent phase termination optimization using involving async mutator callbacks */
#endif /* defined(OMR_GC_CONCURRENT_SCAVENGER) */
uintptr_t scavengerFailedTenureThreshold;
uintptr_t maxScavengeBeforeGlobal;
Expand Down Expand Up @@ -1705,7 +1706,8 @@ class MM_GCExtensionsBase : public MM_BaseVirtual {
, concurrentScavengerBackgroundThreads(1)
, concurrentScavengerBackgroundThreadsForced(false)
, concurrentScavengerSlack(0)
, concurrentScavengerAllocDeviationBoost(2.0)
, concurrentScavengerAllocAverageBoost(1.5)
, concurrentScavengerAllocDeviationBoost(5.0)
, concurrentScavengeExhaustiveTermination(true)
#endif /* defined(OMR_GC_CONCURRENT_SCAVENGER) */
, scavengerFailedTenureThreshold(0)
Expand Down
2 changes: 1 addition & 1 deletion gc/base/MemorySubSpaceSemiSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ MM_MemorySubSpaceSemiSpace::checkSubSpaceMemoryPostCollectTilt(MM_EnvironmentBas
#if defined(OMR_GC_CONCURRENT_SCAVENGER)
if (_extensions->isConcurrentScavengerEnabled()) {
/* Account for mutator allocated objects in hybrid survivor/allocated during concurrent phase of Concurrent Scavenger */
desiredSurvivorSize += _avgBytesAllocatedDuringConcurrent * 1.1
desiredSurvivorSize += extensions->concurrentScavengerAllocAverageBoost * _avgBytesAllocatedDuringConcurrent
+ extensions->concurrentScavengerAllocDeviationBoost * (uintptr_t)_avgDeviationBytesAllocatedDuringConcurrent
+ extensions->concurrentScavengerSlack;
if (debug) {
Expand Down

0 comments on commit dba1460

Please sign in to comment.