On Fri, Mar 31, 2023 at 11:36 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote: > > On Fri, Mar 31, 2023 at 11:19:45AM -0700, Andrii Nakryiko wrote: > > On Wed, Mar 22, 2023 at 8:45 AM Arnaldo Carvalho de Melo > > <acme@xxxxxxxxxx> wrote: > > > Having said that, it seems there will be no extra memory overhead at > > > least for a fedora:36 x86_64 kernel: > > > > Makes sense to me as well. Whatever the solution, as long as it's > > usable from NMI contexts would be fine for the purposes of fetching > > build ID. It would be good to hear from folks that are opposing adding > > a pointer field to struct file whether they prefer this way instead? > > Still no. While it may not take up any room right now, this will > surely not be the last thing added to struct file. When something > which is genuinely useful needs to be added, that person should > not have to sort out your mess first, So I assume you are talking about adding a pointer field to the struct file, right? What about the alternative proposed by Arnaldo to have a struct exec_file that extends a struct file? > > NAK now, NAK tomorrow, NAK forever. Al told you how you could do it > without trampling on core data structures. As I replied to Al, any solution that will have a lookup table on the side isn't compatible with usage from NMI context due to locking. And lots of tracing use cases are based on perf counters which are handled in NMI context. And that's besides all the complexities with right-sizing hash maps (if hashmaps are to be used).