On Thu, Jun 12, 2025 at 8:58 AM Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote: > > On Wed, Jun 11, 2025 at 5:07 PM Menglong Dong <menglong8.dong@xxxxxxxxx> wrote: > > > > Hi Alexei, thank you for your explanation, and now I realize the > > problem is my hash table :/ > > > > My hash table made reference to ftrace and fprobe, whose > > max budget length is 1024. > > > > It's interesting to make the hash table O(1) by using rhashtable > > or sizing up the budgets, as you said. I suspect we even don't > > need the function padding part if the hash table is random > > enough. > > I suggest starting with rhashtable. It's used in many > performance critical places, and when rhashtable_params are > constant the compiler optimizes everything nicely. > lookup is lockless and only needs RCU, so safe to use > from fentry_multi. Thanks for the advice! rhashtable is a nice choice for fentry_multi. and I'll redesign the function metadata with it. Thanks! Menglong Dong