Re: [v3 PATCH 1/1] fs/proc: Expose mm_cpumask in /proc/[pid]/status
From: Dave Hansen
Date: Thu Jan 15 2026 - 16:39:29 EST
On 1/15/26 13:19, David Hildenbrand (Red Hat) wrote:
> On 1/15/26 21:54, Aaron Tomlin wrote:
>> This patch introduces two new fields to /proc/[pid]/status to display the
>> set of CPUs, representing the CPU affinity of the process's active
>> memory context, in both mask and list format: "Cpus_active_mm" and
>> "Cpus_active_mm_list". The mm_cpumask is primarily used for TLB and
>> cache synchronisation.
I don't think this is the kind of thing we want to expose as ABI. It's
too deep of an implementation detail. Any meaning derived from it could
also change on a whim.
For instance, we've changed the rules about when CPUs are put in or
taken out of mm_cpumask() over time. I think the rules might have even
depended on the idle driver that your system was using at one time. I
think Rik also just changed some rules around it in his INVLPGB patches.
I'm not denying how valuable this kind of information might be. I just
don't think it's generally useful enough to justify an ABI that we need
to maintain forever. Tracing seems like a much more appropriate way to
get the data you are after than new ABI.
Can you get the info that you're after with kprobes? Or new tracepoints?