On 11/5/2024 6:13 AM, Martin KaFai Lau wrote:
On 11/4/24 9:53 AM, Alexei Starovoitov wrote:
As a separate clean up I would switch the freeing to call_rcu_tasks.
Synchronous waiting is expensive.
Martin,
any suggestions?
There is a map->rcu now. May be add a "bool free_after_rcu_tasks_gp" to "struct bpf_map" and do the call_rcu_tasks() in bpf_map_put(). The bpf_struct_ops_map_alloc() can set the map->free_after_rcu_tasks_gp.
Take this chance to remove the "st_map->rcu" from "struct bpf_struct_ops_map" also. It is a left over after cleaning up the kvalue->refcnt in the
commit b671c2067a04 ("bpf: Retire the struct_ops map kvalue->refcnt.").
Xu, it will be great if you can follow up with this cleanup. Otherwise, I will put it under the top of my todo list. Let me know what you prefer.
Sure, I'll take this cleanup, thanks.