On Sat, Mar 26, 2022 at 3:43 AM Peng He <[email protected]> wrote:
>
> add a rcu_barrier before close_dpif_backer to ensure that
> all meters has been freed before id_pool_destory meter's
> id-pool.
>
> Signed-off-by: Peng He <[email protected]>
On the principle, the issue seems fixed.
And I have been running successfully 'make check -C build-asan
TESTSUITEFLAGS="-k meter -d"' in a loop for some time tonight.
This usually fails after 1h on origin/master.
I'll let a simplified version of the patch (see below) run for the
whole night after sending this mail.
Why a simplified patch? Because I don't think we need a new rcu api.
This issue only occurs with ofproto dpif implementation.
Adding a new api might encourage people to use it even if unneeded in
more simpler places in OVS.
I squashed your series into:
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 6601f2346..402cdcdf5 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1805,6 +1805,7 @@ destruct(struct ofproto *ofproto_, bool del)
struct rule_dpif *rule;
struct oftable *table;
struct ovs_list ams;
+ struct seq *seq;
ofproto->backer->need_revalidate = REV_RECONFIGURE;
xlate_txn_start();
@@ -1848,6 +1849,14 @@ destruct(struct ofproto *ofproto_, bool del)
seq_destroy(ofproto->ams_seq);
+ /* Wait for all the meter rules to be destroyed. */
+ seq = seq_create();
+ ovsrcu_synchronize();
+ seq_wait(seq, seq_read(seq));
+ ovsrcu_postpone__((void (*)(void *))seq_change, seq);
+ poll_block();
+ seq_destroy(seq);
+
close_dpif_backer(ofproto->backer, del);
}
Let's hope it passes the night tests :-).
--
David Marchand
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev