Re: [PATCH 1/4] memcg: Track exported dma-buffers

2023-01-10 Thread T.J. Mercier
On Tue, Jan 10, 2023 at 12:58 AM Michal Hocko wrote: > > On Mon 09-01-23 21:38:04, T.J. Mercier wrote: > > When a buffer is exported to userspace, use memcg to attribute the > > buffer to the allocating cgroup until all buffer references are > > released. > > > > Unlike the dmabuf sysfs stats impl

Re: [PATCH 1/4] memcg: Track exported dma-buffers

2023-01-10 Thread Michal Hocko
On Mon 09-01-23 21:38:04, T.J. Mercier wrote: > When a buffer is exported to userspace, use memcg to attribute the > buffer to the allocating cgroup until all buffer references are > released. > > Unlike the dmabuf sysfs stats implementation, this memcg accounting > avoids contention over the kern

[PATCH 1/4] memcg: Track exported dma-buffers

2023-01-09 Thread T.J. Mercier
When a buffer is exported to userspace, use memcg to attribute the buffer to the allocating cgroup until all buffer references are released. Unlike the dmabuf sysfs stats implementation, this memcg accounting avoids contention over the kernfs_rwsem incurred when creating or removing nodes. Signed