Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#8329 from eclipse/revert-8254-doubl…
Browse files Browse the repository at this point in the history
…emap_huge

Revert "Disable double mapping when page size exceeds default page size"
  • Loading branch information
pshipton authored Jan 17, 2020
2 parents 859442d + af39373 commit 9555017
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 35 deletions.
10 changes: 2 additions & 8 deletions runtime/gc_base/IndexableObjectAllocationModel.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*******************************************************************************
* Copyright (c) 1991, 2020 IBM Corp. and others
* Copyright (c) 1991, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -128,13 +128,7 @@ class MM_IndexableObjectAllocationModel : public MM_JavaObjectAllocationModel
/**
* For non-contiguous arraylets (discontiguous arraylets, hybrid not allowed
* when double map is enabled), double maps the arraylet leaves to a contiguous
* region outside the heap, making a discontiguous arraylet look contiguous.
* Currently double map is enabled by manually passing command line option
* XXgc:enableDoubleMapping; however, if the system supports huge pages and
* double map gets manually enabled, then double map will be disabled. That's
* because double map does support huge pages yet. If one still wants to
* enable double map in such systems, one must manually force the application
* to use the small system page size
* region outside the heap, making a discontiguous arraylet look contiguous
*
* @param env thread GC Environment
* @param objectPtr indexable object spine
Expand Down
12 changes: 5 additions & 7 deletions runtime/gc_glue_java/ArrayletObjectModelBase.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2020 IBM Corp. and others
* Copyright (c) 1991, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -141,10 +141,8 @@ class GC_ArrayletObjectModelBase

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
/**
* Sets enable double mapping status. Note that the double map
* status value may differ from the requested one in certain
* circuntances.
*
* Sets enable double mapping
*
* @param enableDoubleMapping
*/
MMINLINE void
Expand All @@ -154,9 +152,9 @@ class GC_ArrayletObjectModelBase
}

/**
* Returns enable double mapping status
* Returns enable double mapping
*
* @return true if double mapping status is set to true, false otherwise.
* @return true if double mapping is enabled, false otherwise
*/
MMINLINE bool
isDoubleMappingEnabled()
Expand Down
10 changes: 5 additions & 5 deletions runtime/gc_modron_startup/mmparseXXgc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2020 IBM Corp. and others
* Copyright (c) 1991, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -165,12 +165,12 @@ gcParseXXgcArguments(J9JavaVM *vm, char *optArg)
continue;
}
#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
if (try_scan(&scan_start, "enableArrayletDoubleMapping")) {
extensions->isArrayletDoubleMapRequested = true;
if (try_scan(&scan_start, "enableDoubleMapping")) {
extensions->indexableObjectModel.setEnableDoubleMapping(true);
continue;
}
if (try_scan(&scan_start, "disableArrayletDoubleMapping")) {
extensions->isArrayletDoubleMapRequested = false;
if (try_scan(&scan_start, "disableDoubleMapping")) {
extensions->indexableObjectModel.setEnableDoubleMapping(false);
continue;
}
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */
Expand Down
16 changes: 1 addition & 15 deletions runtime/gc_vlhgc/ConfigurationIncrementalGenerational.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/*******************************************************************************
* Copyright (c) 1991, 2020 IBM Corp. and others
* Copyright (c) 1991, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -97,20 +97,6 @@ MM_ConfigurationIncrementalGenerational::createHeapWithManager(MM_EnvironmentBas
return NULL;
}

#if defined(J9VM_GC_ENABLE_DOUBLE_MAP)
/* Disable double map if requested page sizes used is equal to huge pages.
* Currently double map is not supported when huge pages are used.
* Note that we keep two double map fields: one for requested and another for
* status. If large pages is enabled, it will only change the STATUS of double
* mapping, keeping the REQUESTED double mapping field intact.
*/
if (extensions->isArrayletDoubleMapRequested) {
if (!extensions->memoryManager->isLargePage(env, heap->getPageSize())) {
extensions->indexableObjectModel.setEnableDoubleMapping(true);
}
}
#endif /* J9VM_GC_ENABLE_DOUBLE_MAP */

/* when we try to attach this heap to a region manager, we will need the card table since it needs to be NUMA-affinitized using the same logic as the heap so initialize it here */
extensions->cardTable = MM_IncrementalCardTable::newInstance(MM_EnvironmentVLHGC::getEnvironment(env), heap);
if (NULL == extensions->cardTable) {
Expand Down

0 comments on commit 9555017

Please sign in to comment.