@@ -116,47 +116,12 @@ void MutableNUMASpace::ensure_parsability() {
116
116
" Remaining size (" SIZE_FORMAT " ) is too small to fill (based on " SIZE_FORMAT " and " SIZE_FORMAT " )" ,
117
117
words_to_fill, words_left_to_fill, CollectedHeap::filler_array_max_size ());
118
118
CollectedHeap::fill_with_object (cur_top, words_to_fill);
119
- if (!os::numa_has_static_binding ()) {
120
- size_t touched_words = words_to_fill;
121
- #ifndef ASSERT
122
- if (!ZapUnusedHeapArea) {
123
- touched_words = MIN2 ((size_t )align_object_size (typeArrayOopDesc::header_size (T_INT)),
124
- touched_words);
125
- }
126
- #endif
127
- MemRegion invalid;
128
- HeapWord *crossing_start = align_up (cur_top, os::vm_page_size ());
129
- HeapWord *crossing_end = align_down (cur_top + touched_words, os::vm_page_size ());
130
- if (crossing_start != crossing_end) {
131
- // If object header crossed a small page boundary we mark the area
132
- // as invalid rounding it to a page_size().
133
- HeapWord *start = MAX2 (align_down (cur_top, page_size ()), s->bottom ());
134
- HeapWord *end = MIN2 (align_up (cur_top + touched_words, page_size ()), s->end ());
135
- invalid = MemRegion (start, end);
136
- }
137
-
138
- ls->add_invalid_region (invalid);
139
- }
140
119
cur_top += words_to_fill;
141
120
words_left_to_fill -= words_to_fill;
142
121
}
143
122
}
144
123
} else {
145
- if (!os::numa_has_static_binding ()) {
146
- #ifdef ASSERT
147
- MemRegion invalid (s->top (), s->end ());
148
- ls->add_invalid_region (invalid);
149
- #else
150
- if (ZapUnusedHeapArea) {
151
- MemRegion invalid (s->top (), s->end ());
152
- ls->add_invalid_region (invalid);
153
- } else {
154
- return ;
155
- }
156
- #endif
157
- } else {
158
- return ;
159
- }
124
+ return ;
160
125
}
161
126
}
162
127
}
@@ -278,18 +243,7 @@ void MutableNUMASpace::free_region(MemRegion mr) {
278
243
279
244
// Update space layout. Perform adaptation.
280
245
void MutableNUMASpace::update () {
281
- bool should_initialize = false ;
282
- if (!os::numa_has_static_binding ()) {
283
- for (int i = 0 ; i < lgrp_spaces ()->length (); i++) {
284
- if (!lgrp_spaces ()->at (i)->invalid_region ().is_empty ()) {
285
- should_initialize = true ;
286
- break ;
287
- }
288
- }
289
- }
290
-
291
- if (should_initialize ||
292
- (UseAdaptiveNUMAChunkSizing && adaptation_cycles () < samples_count ())) {
246
+ if (UseAdaptiveNUMAChunkSizing && adaptation_cycles () < samples_count ()) {
293
247
// A NUMA space is never mangled
294
248
initialize (region (),
295
249
SpaceDecorator::Clear,
@@ -605,31 +559,12 @@ void MutableNUMASpace::initialize(MemRegion mr,
605
559
intersection = MemRegion (new_region.start (), new_region.start ());
606
560
}
607
561
608
- if (!os::numa_has_static_binding ()) {
609
- MemRegion invalid_region = ls->invalid_region ().intersection (new_region);
610
- // Invalid region is a range of memory that could've possibly
611
- // been allocated on the other node. That's relevant only on Solaris where
612
- // there is no static memory binding.
613
- if (!invalid_region.is_empty ()) {
614
- merge_regions (new_region, &intersection, &invalid_region);
615
- free_region (invalid_region);
616
- ls->set_invalid_region (MemRegion ());
617
- }
618
- }
619
-
620
562
select_tails (new_region, intersection, &bottom_region, &top_region);
621
563
622
- if (!os::numa_has_static_binding ()) {
623
- // If that's a system with the first-touch policy then it's enough
624
- // to free the pages.
625
- free_region (bottom_region);
626
- free_region (top_region);
627
- } else {
628
- // In a system with static binding we have to change the bias whenever
629
- // we reshape the heap.
630
- bias_region (bottom_region, ls->lgrp_id ());
631
- bias_region (top_region, ls->lgrp_id ());
632
- }
564
+ // In a system with static binding we have to change the bias whenever
565
+ // we reshape the heap.
566
+ bias_region (bottom_region, ls->lgrp_id ());
567
+ bias_region (top_region, ls->lgrp_id ());
633
568
634
569
// Clear space (set top = bottom) but never mangle.
635
570
s->initialize (new_region, SpaceDecorator::Clear, SpaceDecorator::DontMangle, MutableSpace::DontSetupPages);
@@ -664,18 +599,12 @@ void MutableNUMASpace::set_top(HeapWord* value) {
664
599
}
665
600
}
666
601
667
- if (!os::numa_has_static_binding () && top < value && top < s->end ()) {
668
- ls->add_invalid_region (MemRegion (top, value));
669
- }
670
602
s->set_top (value);
671
603
found_top = true ;
672
604
} else {
673
605
if (found_top) {
674
- s->set_top (s->bottom ());
606
+ s->set_top (s->bottom ());
675
607
} else {
676
- if (!os::numa_has_static_binding () && top < s->end ()) {
677
- ls->add_invalid_region (MemRegion (top, s->end ()));
678
- }
679
608
s->set_top (s->end ());
680
609
}
681
610
}
@@ -742,12 +671,6 @@ HeapWord* MutableNUMASpace::cas_allocate(size_t size) {
742
671
}
743
672
}
744
673
745
- // Make the page allocation happen here if there is no static binding.
746
- if (p != nullptr && !os::numa_has_static_binding () ) {
747
- for (HeapWord *i = p; i < p + size; i += os::vm_page_size () >> LogHeapWordSize) {
748
- *(int *)i = 0 ;
749
- }
750
- }
751
674
if (p == nullptr ) {
752
675
ls->set_allocation_failed ();
753
676
}
0 commit comments