public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next] net: give more chances to rcu in netdev_wait_allrefs_any()
Date: Fri, 26 Apr 2024 13:34:59 +0200	[thread overview]
Message-ID: <ZiuRYxOo0nsVY3bm@nanopsycho> (raw)
In-Reply-To: <20240426064222.1152209-1-edumazet@google.com>

Fri, Apr 26, 2024 at 08:42:22AM CEST, edumazet@google.com wrote:
>This came while reviewing commit c4e86b4363ac ("net: add two more
>call_rcu_hurry()").
>
>Paolo asked if adding one synchronize_rcu() would help.
>
>While synchronize_rcu() does not help, making sure to call
>rcu_barrier() before msleep(wait) is definitely helping
>to make sure lazy call_rcu() are completed.
>
>Instead of waiting ~100 seconds in my tests, the ref_tracker
>splats occurs one time only, and netdev_wait_allrefs_any()
>latency is reduced to the strict minimum.
>
>Ideally we should audit our call_rcu() users to make sure
>no refcount (or cascading call_rcu()) is held too long,
>because rcu_barrier() is quite expensive.
>
>Fixes: 0e4be9e57e8c ("net: use exponential backoff in netdev_wait_allrefs")
>Signed-off-by: Eric Dumazet <edumazet@google.com>
>Link: https://lore.kernel.org/all/28bbf698-befb-42f6-b561-851c67f464aa@kernel.org/T/#m76d73ed6b03cd930778ac4d20a777f22a08d6824

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

  reply	other threads:[~2024-04-26 11:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26  6:42 [PATCH net-next] net: give more chances to rcu in netdev_wait_allrefs_any() Eric Dumazet
2024-04-26 11:34 ` Jiri Pirko [this message]
2024-04-29  9:00 ` patchwork-bot+netdevbpf

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=ZiuRYxOo0nsVY3bm@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --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