From: Martin KaFai Lau <martin.lau@linux•dev>
To: paulmck@kernel•org
Cc: Alexei Starovoitov <ast@kernel•org>,
Daniel Borkmann <daniel@iogearbox•net>,
Andrii Nakryiko <andrii@kernel•org>, Song Liu <song@kernel•org>,
Yonghong Song <yhs@fb•com>,
John Fastabend <john.fastabend@gmail•com>,
KP Singh <kpsingh@kernel•org>,
Stanislav Fomichev <sdf@google•com>, Hao Luo <haoluo@google•com>,
Jiri Olsa <jolsa@kernel•org>,
bpf@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: [PATCH bpf] Use call_rcu_hurry() with synchronize_rcu_mult()
Date: Thu, 18 May 2023 09:51:39 -0700 [thread overview]
Message-ID: <b18fdfc3-987d-9351-ca6c-5d4cb2d71af1@linux.dev> (raw)
In-Reply-To: <358bde93-4933-4305-ac42-4d6f10c97c08@paulmck-laptop>
On 5/18/23 7:47 AM, Paul E. McKenney wrote:
> The bpf_struct_ops_map_free() function must wait for both an RCU grace
> period and an RCU Tasks grace period, and so it passes call_rcu() and
> call_rcu_tasks() to synchronize_rcu_mult(). This works, but on ChromeOS
> and Android platforms call_rcu() can have lazy semantics, resulting in
> multi-second delays between call_rcu() invocation and invocation of the
> corresponding callback.
>
> Therefore, substitute call_rcu_hurry() for call_rcu().
My understanding on the net-effect is to free up the struct_ops resources faster.
I believe call_rcu() should be fine. struct_ops freeing should not happen very
often. For example, when a bpf written tcp congestion control (struct_ops) is
registered, it will stay in the kernel for a long time. A couple seconds delay
in releasing the struct_ops should be acceptable.
next prev parent reply other threads:[~2023-05-18 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 14:47 [PATCH bpf] Use call_rcu_hurry() with synchronize_rcu_mult() Paul E. McKenney
2023-05-18 16:51 ` Martin KaFai Lau [this message]
2023-05-18 17:25 ` Paul E. McKenney
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=b18fdfc3-987d-9351-ca6c-5d4cb2d71af1@linux.dev \
--to=martin.lau@linux$(echo .)dev \
--cc=andrii@kernel$(echo .)org \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=daniel@iogearbox$(echo .)net \
--cc=haoluo@google$(echo .)com \
--cc=john.fastabend@gmail$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kpsingh@kernel$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=paulmck@kernel$(echo .)org \
--cc=sdf@google$(echo .)com \
--cc=song@kernel$(echo .)org \
--cc=yhs@fb$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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