Skip to content

Commit 0ae4fa7

Browse files
Joachim KernTheRealMDoerr
authored andcommitted
8327210: AIX: Delete obsolete parameter Use64KPagesThreshold
Reviewed-by: gli, stuefe, mdoerr
1 parent 107cb53 commit 0ae4fa7

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

src/hotspot/os/aix/globals_aix.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@
6666
product(bool, Use64KPages, true, \
6767
"Use 64K pages if available.") \
6868
\
69-
/* If VM uses 64K paged memory (shmat) for virtual memory: threshold below */ \
70-
/* which virtual memory allocations are done with 4K memory (mmap). This is */ \
71-
/* mainly for test purposes. */ \
72-
develop(uintx, Use64KPagesThreshold, 0, \
73-
"4K/64K page allocation threshold.") \
74-
\
7569
/* Normally AIX commits memory on touch, but sometimes it is helpful to have */ \
7670
/* explicit commit behaviour. This flag, if true, causes the VM to touch */ \
7771
/* memory on os::commit_memory() (which normally is a noop). */ \

src/hotspot/os/aix/os_aix.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2023 SAP SE. All rights reserved.
3+
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -1970,11 +1970,7 @@ char* os::pd_reserve_memory(size_t bytes, bool exec) {
19701970
if (os::vm_page_size() == 4*K) {
19711971
return reserve_mmaped_memory(bytes, nullptr /* requested_addr */);
19721972
} else {
1973-
if (bytes >= Use64KPagesThreshold) {
1974-
return reserve_shmated_memory(bytes, nullptr /* requested_addr */);
1975-
} else {
1976-
return reserve_mmaped_memory(bytes, nullptr /* requested_addr */);
1977-
}
1973+
return reserve_shmated_memory(bytes, nullptr /* requested_addr */);
19781974
}
19791975
}
19801976

@@ -2183,11 +2179,7 @@ char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, bool
21832179
if (os::vm_page_size() == 4*K) {
21842180
return reserve_mmaped_memory(bytes, requested_addr);
21852181
} else {
2186-
if (bytes >= Use64KPagesThreshold) {
2187-
return reserve_shmated_memory(bytes, requested_addr);
2188-
} else {
2189-
return reserve_mmaped_memory(bytes, requested_addr);
2190-
}
2182+
return reserve_shmated_memory(bytes, requested_addr);
21912183
}
21922184

21932185
return addr;

test/hotspot/gtest/runtime/test_os.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ TEST_VM(os, reserve_at_wish_address_shall_not_replace_mappings_largepages) {
957957
#ifdef AIX
958958
// On Aix, we should fail attach attempts not aligned to segment boundaries (256m)
959959
TEST_VM(os, aix_reserve_at_non_shmlba_aligned_address) {
960-
if (Use64KPages && Use64KPagesThreshold == 0) {
960+
if (Use64KPages) {
961961
char* p = os::attempt_reserve_memory_at((char*)0x1f00000, M);
962962
ASSERT_EQ(p, nullptr); // should have failed
963963
p = os::attempt_reserve_memory_at((char*)((64 * G) + M), M);

0 commit comments

Comments
 (0)