Re: [RFC 0/6] Module for tracking/accounting shared memory buffers

From: Dave Hansen
Date: Wed Oct 12 2016 - 13:28:30 EST

On 10/11/2016 04:50 PM, Ruchi Kandoi wrote:
> Any process holding a reference to these buffers will keep the kernel from
> reclaiming its backing pages. mm counters don't provide a complete picture of
> these allocations, since they only account for pages that are mapped into a
> process's address space. This problem is especially bad for systems like
> Android that use dma-buf fds to share graphics and multimedia buffers between
> processes: these allocations are often large, have complex sharing patterns,
> and are rarely mapped into every process that holds a reference to them.

What do you end up _doing_ with all this new information that you have
here? You know which processes have "pinned" these shared buffers, and
exported that information in /proc. But, then what?