On Thu, Jul 3, 2025 at 5:17 AM Menglong Dong <menglong8.dong@xxxxxxxxx> wrote: > > We don't use rhashtable here, as the compiler is not clever enough and it > refused to inline the hash lookup for me, which bring in addition overhead > in the following BPF global trampoline. That's not good enough justification. rhashtable is used in many performance critical components. You need to figure out what was causing compiler not to inline lookup in your case. Did you make sure that params are constant as I suggested earlier? If 'static inline' wasn't enough, have you tried always_inline ? > The release of the metadata is controlled by the percpu ref and RCU > together, and have similar logic to the release of bpf trampoline image in > bpf_tramp_image_put(). tbh the locking complexity in this patch is through the roof. rcu, rcu_tasks, rcu_task_trace, percpu_ref, ... all that look questionable. kfunc_mds looks to be rcu protected, but md-s are percpu_ref. Why? There were choices made that I don't understand the reasons for. I don't think we should start in depth review of rhashtable-wanne-be when rhashtable should just work.