af_unix: Avoid Tarjan's algorithm if unnecessary.
Once a cyclic reference is formed, we need to run GC to check if there is dead SCC. However, we do not need to run Tarjan's algorithm if we know that the shape of the inflight graph has not been changed. If an edge is added/updated/deleted and the edge's successor is inflight, we set false to unix_graph_grouped, which means we need to re-classify SCC. Once we finalise SCC, we set true to unix_graph_grouped. While unix_graph_grouped is true, we can iterate the grouped SCC using vertex->scc_entry in unix_walk_scc_fast(). list_add() and list_for_each_entry_reverse() uses seem weird, but they are to keep the vertex order consistent and make writing test easier. Signed-off-by:Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by:
Paolo Abeni <pabeni@redhat.com> Link: https://lore.kernel.org/r/20240325202425.60930-12-kuniyu@amazon.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org>
Loading
-
mentioned in commit 2d79f856
-
mentioned in commit 144edd57
-
mentioned in commit 5688ed42
-
mentioned in commit 7d29ef7b
-
mentioned in commit bd87c75b
-
mentioned in commit d57d76db
-
mentioned in commit fee19dc6
-
mentioned in commit 5b12797b
-
mentioned in commit bd6c2f2f
-
mentioned in commit c8e90fed
-
mentioned in commit 93ec918b
-
mentioned in commit 082eed9a
-
mentioned in commit d5f3d13b
-
mentioned in commit 4b57bda6
-
mentioned in commit f2e2da79
-
mentioned in commit ff47b5a1
-
mentioned in commit 356e27c3
-
mentioned in commit a6e002b9
-
mentioned in commit 1a923396
-
mentioned in commit 301a7777
-
mentioned in commit 64b6d78e
-
mentioned in commit 7d2e65e1
-
mentioned in commit 40994d5a
-
mentioned in commit b22b0a75
Please sign in to comment