Re: [RFC 1/1] mm: Add per-task struct tlb counters

From: Peter Zijlstra
Date: Thu Sep 15 2022 - 04:50:56 EST


On Wed, Sep 14, 2022 at 07:15:08AM -0700, Joe Damato wrote:

> I could patch count_vm_tlb... to account on a per-task basis. That seems
> reasonable to me... assuming you and others are convinced that it's a
> better approach than tracepoints ;)

Well, we *could* do a lot of things, but we can all spend out cycles
only once. Doing endless variations of statistics contributes to
death-by-a-thoudsand-cuts.

If you really think you need this, write yourself an eBPF program and
attach it to these tracepoints. Then you get less cycles for useful
work, but the rest of us isn't bothered by that.