It is not effective and it can lead to regressions, due to the added synchronizations and work splitting.
#define SGEN_MAX_PAUSE_TIME 30
#define SGEN_MAX_PAUSE_MARGIN 0.66f
+/*
+ * In practice, for nurseries smaller than this, the parallel minor tends to be
+ * ineffective, even leading to regressions. Avoid using it for smaller nurseries.
+ */
+#define SGEN_PARALLEL_MINOR_MIN_NURSERY_SIZE (1 << 24)
+
#endif
object_ops_nopar = &sgen_minor_collector.serial_ops_with_concurrent_major;
} else {
object_ops_nopar = &sgen_minor_collector.serial_ops;
- if (sgen_minor_collector.is_parallel) {
+ if (sgen_minor_collector.is_parallel && sgen_nursery_size >= SGEN_PARALLEL_MINOR_MIN_NURSERY_SIZE) {
object_ops_par = &sgen_minor_collector.parallel_ops;
is_parallel = TRUE;
}