diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2025-11-15 02:08:32 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-11-18 19:19:31 -0800 |
| commit | 58b47c713711b8afbf68e3158d4d5acdead00e9b (patch) | |
| tree | 775ed41aabe820b168c153ee3ac081102e42fccc /net/unix/af_unix.h | |
| parent | f83e0e0b63fe57801d22750e31a0afb5403b3d02 (diff) | |
af_unix: Count cyclic SCC.
__unix_walk_scc() and unix_walk_scc_fast() call unix_scc_cyclic()
for each SCC to check if it forms a cyclic reference, so that we
can skip GC at the following invocations in case all SCCs do not
have any cycles.
If we count the number of cyclic SCCs in __unix_walk_scc(), we can
simplify unix_walk_scc_fast() because the number of cyclic SCCs
only changes when it garbage-collects a SCC.
So, let's count cyclic SCC in __unix_walk_scc() and decrement it
in unix_walk_scc_fast() when performing garbage collection.
Note that we will use this counter in a later patch to check if a
cycle existed in the previous GC run.
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20251115020935.2643121-2-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/af_unix.h')
0 files changed, 0 insertions, 0 deletions