netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>,
	Kuniyuki Iwashima <kuni1840@gmail.com>, <netdev@vger.kernel.org>
Subject: [PATCH v1 net-next 0/6] af_unix: GC cleanup and optimisation
Date: Fri, 3 May 2024 15:31:44 -0700	[thread overview]
Message-ID: <20240503223150.6035-1-kuniyu@amazon.com> (raw)

The first patch removes a small race introduced by commit 1af2dface5d2
("af_unix: Don't access successor in unix_del_edges() during GC.").

Other patches clean up GC and optimise it so that we no longer schedule
it if we know that no loop exists in the inflight graph.


Kuniyuki Iwashima (6):
  af_unix: Add dead flag to struct scm_fp_list.
  af_unix: Save the number of loops in inflight graph.
  af_unix: Manage inflight graph state as unix_graph_state.
  af_unix: Move wait_for_unix_gc() to unix_prepare_fpl().
  af_unix: Schedule GC based on graph state during sendmsg().
  af_unix: Schedule GC only if loop exists during close().

 include/net/af_unix.h |   4 +-
 include/net/scm.h     |   1 +
 net/core/scm.c        |   1 +
 net/unix/af_unix.c    |   7 +--
 net/unix/garbage.c    | 117 ++++++++++++++++++++++++++----------------
 5 files changed, 76 insertions(+), 54 deletions(-)

-- 
2.30.2


             reply	other threads:[~2024-05-03 22:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 22:31 Kuniyuki Iwashima [this message]
2024-05-03 22:31 ` [PATCH v1 net-next 1/6] af_unix: Add dead flag to struct scm_fp_list Kuniyuki Iwashima
2024-05-03 22:31 ` [PATCH v1 net-next 2/6] af_unix: Save the number of loops in inflight graph Kuniyuki Iwashima
2024-05-07 13:54   ` Paolo Abeni
2024-05-07 16:11     ` Kuniyuki Iwashima
2024-05-08 10:08       ` Paolo Abeni
2024-05-08 17:05         ` Kuniyuki Iwashima
2024-05-03 22:31 ` [PATCH v1 net-next 3/6] af_unix: Manage inflight graph state as unix_graph_state Kuniyuki Iwashima
2024-05-03 22:31 ` [PATCH v1 net-next 4/6] af_unix: Move wait_for_unix_gc() to unix_prepare_fpl() Kuniyuki Iwashima
2024-05-03 22:31 ` [PATCH v1 net-next 5/6] af_unix: Schedule GC based on graph state during sendmsg() Kuniyuki Iwashima
2024-05-03 22:31 ` [PATCH v1 net-next 6/6] af_unix: Schedule GC only if loop exists during close() Kuniyuki Iwashima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240503223150.6035-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).