rcuja: use rcu_barrier in destroy
[userspace-rcu.git] / rcuja / rcuja.c
index b0d33221ae6c730ed756453b655dba5564fe38b7..0f07b15436e8b51b1591601fd4568ffb9dfa0c7e 100644 (file)
@@ -128,7 +128,7 @@ const struct cds_ja_type ja_types[] = {
         * Upon node removal below min_child, if child pool is filled
         * beyond capacity, we roll back to pigeon.
         */
-       { .type_class = RCU_JA_PIGEON, .min_child = 89, .max_child = ja_type_7_max_child, .order = 10, },
+       { .type_class = RCU_JA_PIGEON, .min_child = 83, .max_child = ja_type_7_max_child, .order = 10, },
 
        { .type_class = RCU_JA_NULL, .min_child = 0, .max_child = ja_type_8_max_child, },
 };
@@ -176,7 +176,7 @@ const struct cds_ja_type ja_types[] = {
         * Upon node removal below min_child, if child pool is filled
         * beyond capacity, we roll back to pigeon.
         */
-       { .type_class = RCU_JA_PIGEON, .min_child = 101, .max_child = ja_type_7_max_child, .order = 11, },
+       { .type_class = RCU_JA_PIGEON, .min_child = 95, .max_child = ja_type_7_max_child, .order = 11, },
 
        { .type_class = RCU_JA_NULL, .min_child = 0, .max_child = ja_type_8_max_child, },
 };
@@ -2435,6 +2435,10 @@ int cds_ja_destroy(struct cds_ja *ja,
        ret = rcuja_delete_ht(ja->ht);
        if (ret)
                return ret;
+
+       /* Wait for in-flight call_rcu free to complete. */
+       flavor->barrier();
+
        flavor->thread_online();
        if (uatomic_read(&ja->nr_fallback))
                fprintf(stderr,
This page took 0.024152 seconds and 4 git commands to generate.