On Wed, May 03, 2023 at 08:19:24AM -1000, Tejun Heo wrote: > > Taking a step back though, given the multitude of allocation sites in > > the kernel, it's a bit odd that the only accounting we do is the tiny > > fraction of voluntary vmstat/meminfo reporting. We try to cover the > > biggest consumers with this of course, but it's always going to be > > incomplete and is maintenance overhead too. There are on average > > several gigabytes in unknown memory (total - known vmstats) on our > > machines. It's difficult to detect regressions easily. And it's per > > definition the unexpected cornercases that are the trickiest to track > > down. So it might be doable with BPF, but it does feel like the kernel > > should do a better job of tracking out of the box and without > > requiring too much plumbing and somewhat fragile kernel allocation API > > tracking and probing from userspace. > > Yeah, easy / default visibility argument does make sense to me. So, a bit of addition here. If this is the thrust, the debugfs part seems rather redundant, right? That's trivially obtainable with tracing / bpf and in a more flexible and performant manner. Also, are we happy with recording just single depth for persistent tracking? Thanks. -- tejun