< prev index next >
src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp
Print this page
*** 135,154 ****
_filesystem = buf.f_type;
_block_size = buf.f_bsize;
_available = buf.f_bavail * _block_size;
- // Make sure we're on a supported filesystem
- if (!is_tmpfs() && !is_hugetlbfs()) {
- log_error(gc)("Backing file must be located on a %s or a %s filesystem",
- ZFILESYSTEM_TMPFS, ZFILESYSTEM_HUGETLBFS);
- return;
- }
-
// Make sure the filesystem type matches requested large page type
if (ZLargePages::is_transparent() && !is_tmpfs()) {
! log_error(gc)("-XX:+UseTransparentHugePages can only be enable when using a %s filesystem",
ZFILESYSTEM_TMPFS);
return;
}
if (ZLargePages::is_transparent() && !tmpfs_supports_transparent_huge_pages()) {
--- 135,147 ----
_filesystem = buf.f_type;
_block_size = buf.f_bsize;
_available = buf.f_bavail * _block_size;
// Make sure the filesystem type matches requested large page type
if (ZLargePages::is_transparent() && !is_tmpfs()) {
! log_error(gc)("-XX:+UseTransparentHugePages can only be enabled when using a %s filesystem",
ZFILESYSTEM_TMPFS);
return;
}
if (ZLargePages::is_transparent() && !tmpfs_supports_transparent_huge_pages()) {
*** 167,180 ****
log_error(gc)("-XX:+UseLargePages must be enabled when using a %s filesystem",
ZFILESYSTEM_HUGETLBFS);
return;
}
! const size_t expected_block_size = is_tmpfs() ? os::vm_page_size() : os::large_page_size();
! if (expected_block_size != _block_size) {
log_error(gc)("%s filesystem has unexpected block size " SIZE_FORMAT " (expected " SIZE_FORMAT ")",
! is_tmpfs() ? ZFILESYSTEM_TMPFS : ZFILESYSTEM_HUGETLBFS, _block_size, expected_block_size);
return;
}
// Successfully initialized
_initialized = true;
--- 160,185 ----
log_error(gc)("-XX:+UseLargePages must be enabled when using a %s filesystem",
ZFILESYSTEM_HUGETLBFS);
return;
}
! if (ZLargePages::is_explicit() && os::large_page_size() != ZGranuleSize) {
! log_error(gc)("Incompatible large page size configured " SIZE_FORMAT " (expected " SIZE_FORMAT ")",
! os::large_page_size(), ZGranuleSize);
! return;
! }
!
! // Make sure the filesystem block size is compatible
! if (ZGranuleSize % _block_size != 0) {
! log_error(gc)("Filesystem backing the heap has incompatible block size (" SIZE_FORMAT ")",
! _block_size);
! return;
! }
!
! if (is_hugetlbfs() && _block_size != os::large_page_size()) {
log_error(gc)("%s filesystem has unexpected block size " SIZE_FORMAT " (expected " SIZE_FORMAT ")",
! ZFILESYSTEM_HUGETLBFS, _block_size, os::large_page_size());
return;
}
// Successfully initialized
_initialized = true;
< prev index next >