You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow nursery size to be proportional to the heap size (mmtk#1087)
This PR introduces different kinds of nursery size options, and by
default, we use a proportion of the heap size as the min nursery. This
PR should generally improve the generational plans' performance by
triggering a full heap GC more promptly. This PR mitigates the issue
identified in mmtk#594, but does not
fully fix the problem.
let max_bytes = conversions::raw_align_up(max_bytes asusize,BYTES_IN_PAGE);
123
+
if max_bytes > DEFAULT_MAX_NURSERY{
124
+
warn!("Proportional nursery with max size {} ({}) is larger than DEFAULT_MAX_NURSERY ({}). Use DEFAULT_MAX_NURSERY instead.", max, max_bytes,DEFAULT_MAX_NURSERY);
125
+
DEFAULT_MAX_NURSERY
126
+
}else{
127
+
max_bytes
128
+
}
129
+
}
130
+
NurserySize::Fixed(sz) => sz,
131
+
}
132
+
}
133
+
134
+
/// Return lower bound of the nursery size (in number of bytes)
let min_bytes = conversions::raw_align_up(min_bytes asusize,BYTES_IN_PAGE);
146
+
if min_bytes < DEFAULT_MIN_NURSERY{
147
+
warn!("Proportional nursery with min size {} ({}) is smaller than DEFAULT_MIN_NURSERY ({}). Use DEFAULT_MIN_NURSERY instead.", min, min_bytes,DEFAULT_MIN_NURSERY);
148
+
DEFAULT_MIN_NURSERY
149
+
}else{
150
+
min_bytes
151
+
}
152
+
}
153
+
NurserySize::Fixed(sz) => sz,
154
+
}
155
+
}
156
+
157
+
/// Return upper bound of the nursery size (in number of pages)
0 commit comments