All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin KaFai Lau <martin.lau@linux.dev>
To: Kui-Feng Lee <sinquersw@gmail.com>, Kui-Feng Lee <kuifeng@meta.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, song@kernel.org,
	kernel-team@meta.com, andrii@kernel.org, sdf@google.com
Subject: Re: [PATCH bpf-next v3 1/8] bpf: Maintain the refcount of struct_ops maps directly.
Date: Mon, 6 Mar 2023 16:36:04 -0800	[thread overview]
Message-ID: <f2d21101-0522-0b9e-d9d4-9be31f80ad03@linux.dev> (raw)
In-Reply-To: <d0001e7c-1f51-4c92-0b6d-bd92615375b8@gmail.com>

On 3/6/23 3:54 PM, Kui-Feng Lee wrote:
>>> @@ -646,6 +679,7 @@ const struct bpf_map_ops bpf_struct_ops_map_ops = {
>>>       .map_alloc_check = bpf_struct_ops_map_alloc_check,
>>>       .map_alloc = bpf_struct_ops_map_alloc,
>>>       .map_free = bpf_struct_ops_map_free,
>>> +    .map_free_rcu = bpf_struct_ops_map_free_rcu,
>>
>> just came to my mind. Instead of having a rcu callback, synchronize_rcu() can 
>> be called in bpf_struct_ops_map_free(). Then the '.map_free_rcu' addition and 
>> its related change is not needed.
>>
> 
> synchronize_rcu() probably blocks other subsystem, right?

.map_free is called from system_unbound_wq, so it can block.


  reply	other threads:[~2023-03-07  0:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  1:21 [PATCH bpf-next v3 0/8] Transit between BPF TCP congestion controls Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 1/8] bpf: Maintain the refcount of struct_ops maps directly Kui-Feng Lee
2023-03-06 20:10   ` Stanislav Fomichev
2023-03-06 21:45     ` Kui-Feng Lee
2023-03-06 23:16   ` Martin KaFai Lau
2023-03-06 23:54     ` Kui-Feng Lee
2023-03-07  0:36       ` Martin KaFai Lau [this message]
2023-03-03  1:21 ` [PATCH bpf-next v3 2/8] bpf: Create links for BPF struct_ops maps Kui-Feng Lee
2023-03-06 20:23   ` Stanislav Fomichev
2023-03-06 22:02     ` Kui-Feng Lee
2023-03-07  2:11   ` Martin KaFai Lau
2023-03-07 18:04     ` Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 3/8] net: Update an existing TCP congestion control algorithm Kui-Feng Lee
2023-03-07  2:17   ` Martin KaFai Lau
2023-03-07 19:17     ` Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 4/8] libbpf: Create a bpf_link in bpf_map__attach_struct_ops() Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 5/8] bpf: Update the struct_ops of a bpf_link Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 6/8] libbpf: Update a bpf_link with another struct_ops Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 7/8] libbpf: Use .struct_ops.link section to indicate a struct_ops with a link Kui-Feng Lee
2023-03-03  1:21 ` [PATCH bpf-next v3 8/8] selftests/bpf: Test switching TCP Congestion Control algorithms Kui-Feng Lee

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=f2d21101-0522-0b9e-d9d4-9be31f80ad03@linux.dev \
    --to=martin.lau@linux.dev \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuifeng@meta.com \
    --cc=sdf@google.com \
    --cc=sinquersw@gmail.com \
    --cc=song@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.