Skip to content

Commit

Permalink
Use OMRPORT_CPU_TARGET for split list calculation
Browse files Browse the repository at this point in the history
For Flat heap GCs, use OMRPORT_CPU_TARGET (rather than
OMRPORT_CPU_ONLINE). It really is the number of h/w threads available to
JVM process, if configured in a container or by some other OS specific
means.

Same TARGET is used for other (and indirectly related) GC thread count
caculation.

Signed-off-by: Aleksandar Micic <[email protected]>
  • Loading branch information
Aleksandar Micic authored and Aleksandar Micic committed Apr 19, 2024
1 parent 6391cf4 commit 40aab8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gc/base/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ MM_Configuration::initializeGCParameters(MM_EnvironmentBase *env)
/* initialize default split freelist split amount */
if (!extensions->splitFreeListAmountForced) {
OMRPORT_ACCESS_FROM_OMRPORT(env->getPortLibrary());
uintptr_t freeListSplitAmount = (omrsysinfo_get_number_CPUs_by_type(OMRPORT_CPU_ONLINE) - 1) / 8 + 1;
uintptr_t freeListSplitAmount = (omrsysinfo_get_number_CPUs_by_type(OMRPORT_CPU_TARGET) - 1) / 8 + 1;
#if defined(OMR_GC_MODRON_SCAVENGER)
if (extensions->scavengerEnabled) {
freeListSplitAmount = splitAmount;
Expand Down

0 comments on commit 40aab8f

Please sign in to comment.