[RFC 2/6] drivers: misc: add memtrack

2016-10-11 Thread Ruchi Kandoi
s intended for debugging memory leaks rather than production use. Signed-off-by: Greg Hackmann <ghackm...@google.com> Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- drivers/misc/Kconfig | 16 +++ drivers/misc/Makefile| 1 + drivers/

[RFC 3/6] dma-buf: add memtrack support

2016-10-11 Thread Ruchi Kandoi
Signed-off-by: Greg Hackmann <ghackm...@google.com> Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- drivers/dma-buf/dma-buf.c | 37 ++ drivers/staging/android/ion/ion.c | 14 + drivers/staging/android/ion/ion

[RFC 5/6] memtrack: Add memtrack accounting for forked processes.

2016-10-11 Thread Ruchi Kandoi
to the child process instead of the parent. Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- drivers/misc/memtrack.c | 45 +++ drivers/staging/android/ion/ion.c | 45 +-- include/linux/memtrack.h

[RFC 4/6] memtrack: Adds the accounting to keep track of all mmaped/unmapped pages.

2016-10-11 Thread Ruchi Kandoi
Since mmaped pages will be accounted by the PSS, memtrack needs a way to differentiate the total memory that hasn't been accounted for. Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> Signed-off-by: Greg Hackmann <ghackm...@google.com> --- drivers/misc/memtrack.c

[RFC 1/6] fs: add installed and uninstalled file_operations

2016-10-11 Thread Ruchi Kandoi
the responsible task_struct. These are low-level APIs with only two in-tree callers, both adjusted in this patch. Signed-off-by: Greg Hackmann <ghackm...@google.com> Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- drivers/android/binder.c | 4 ++-- fs/file.c

[RFC 6/6] drivers: staging: ion: add ION_IOC_TAG ioctl

2016-10-11 Thread Ruchi Kandoi
From: Greg Hackmann <ghackm...@google.com> ION_IOC_TAG provides a userspace interface for tagging buffers with their memtrack usage after allocation. Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- drivers/staging/android/ion/ion-ioctl.c | 17 + drivers/sta

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

2016-10-11 Thread Ruchi Kandoi
plementations. Greg Hackmann (1): drivers: staging: ion: add ION_IOC_TAG ioctl Ruchi Kandoi (5): fs: add installed and uninstalled file_operations drivers: misc: add memtrack dma-buf: add memtrack support memtrack: Adds the accounting to keep track of all mmaped/unmapped pages. me