All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] store function address in BTF
@ 2021-10-06  8:41 Jiri Olsa
  2021-10-06  8:44 ` Jiri Olsa
  2021-10-06 16:17 ` Andrii Nakryiko
  0 siblings, 2 replies; 10+ messages in thread
From: Jiri Olsa @ 2021-10-06  8:41 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Steven Rostedt (VMware)
  Cc: netdev, bpf, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Daniel Xu, Viktor Malik,
	Arnaldo Carvalho de Melo

hi,
I'm hitting performance issue and soft lock ups with the new version
of the patchset and the reason seems to be kallsyms lookup that we
need to do for each btf id we want to attach

I tried to change kallsyms_lookup_name linear search into rbtree search,
but it has its own pitfalls like duplicate function names and it still
seems not to be fast enough when you want to attach like 30k functions

so I wonder we could 'fix this' by storing function address in BTF,
which would cut kallsyms lookup completely, because it'd be done in
compile time

my first thought was to add extra BTF section for that, after discussion
with Arnaldo perhaps we could be able to store extra 8 bytes after
BTF_KIND_FUNC record, using one of the 'unused' bits in btf_type to
indicate that? or new BTF_KIND_FUNC2 type?

thoughts?

thanks,
jirka


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-07  6:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06  8:41 [RFC] store function address in BTF Jiri Olsa
2021-10-06  8:44 ` Jiri Olsa
2021-10-06 14:53   ` Alexei Starovoitov
2021-10-06 20:07     ` Jiri Olsa
2021-10-06 16:17 ` Andrii Nakryiko
2021-10-06 20:06   ` Jiri Olsa
2021-10-06 21:22     ` Andrii Nakryiko
2021-10-06 22:05       ` Jiri Olsa
2021-10-06 22:37         ` Andrii Nakryiko
2021-10-07  6:55           ` Jiri Olsa

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.