Re: [PATCH bpf-next v2] bpf: Add kernel symbol for struct_ops trampoline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 4, 2024 at 2:13 PM Martin KaFai Lau <martin.lau@xxxxxxxxx> 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.

Ohh. Great point.
struct_ops map can just set the existing free_after_mult_rcu_gp flag
and get rid of this sync call.
Another flag is overkill imo.

> 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.").

+1

> 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.





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux