comparison src/share/vm/gc_implementation/parallelScavenge/psOldGen.cpp @ 3322:567c87d484a0

7041501: NUMA: Expand the old gen more aggressively Summary: Expand the old gen in bigger increments Reviewed-by: jmasa
author iveresov
date Wed, 04 May 2011 15:08:44 -0700
parents eda9eb483d29
children c9ca3f51cf41
comparison
equal deleted inserted replaced
3321:a1d5f532838d 3322:567c87d484a0
222 } 222 }
223 MutexLocker x(ExpandHeap_lock); 223 MutexLocker x(ExpandHeap_lock);
224 const size_t alignment = virtual_space()->alignment(); 224 const size_t alignment = virtual_space()->alignment();
225 size_t aligned_bytes = align_size_up(bytes, alignment); 225 size_t aligned_bytes = align_size_up(bytes, alignment);
226 size_t aligned_expand_bytes = align_size_up(MinHeapDeltaBytes, alignment); 226 size_t aligned_expand_bytes = align_size_up(MinHeapDeltaBytes, alignment);
227
228 if (UseNUMA) {
229 // With NUMA we use round-robin page allocation for the old gen. Expand by at least
230 // providing a page per lgroup. Alignment is larger or equal to the page size.
231 aligned_expand_bytes = MAX2(aligned_expand_bytes, alignment * os::numa_get_groups_num());
232 }
227 if (aligned_bytes == 0){ 233 if (aligned_bytes == 0){
228 // The alignment caused the number of bytes to wrap. An expand_by(0) will 234 // The alignment caused the number of bytes to wrap. An expand_by(0) will
229 // return true with the implication that and expansion was done when it 235 // return true with the implication that and expansion was done when it
230 // was not. A call to expand implies a best effort to expand by "bytes" 236 // was not. A call to expand implies a best effort to expand by "bytes"
231 // but not a guarantee. Align down to give a best effort. This is likely 237 // but not a guarantee. Align down to give a best effort. This is likely