[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 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 Signed-off-by: Greg Hackmann --- drivers/misc/memtrack.c | 175 -- drivers/staging

[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 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 Signed-off-by: Ruchi Kandoi --- drivers/dma-buf/dma-buf.c | 37 ++ drivers/staging/android/ion/ion.c | 14 + drivers/staging/android/ion/ion_priv.h | 2 ++ include/linux/dma-buf.h| 5

[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 Signed-off-by: Ruchi Kandoi --- drivers/misc/Kconfig | 16 +++ drivers/misc/Makefile| 1 + drivers/misc/memtrack.c | 360 +++ fs/p

[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 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 --- drivers/misc/memtrack.c | 45 +++ drivers/staging/android/ion/ion.c | 45 +-- include/linux/memtrack.h | 19 +++-- include

[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 6/6] drivers: staging: ion: add ION_IOC_TAG ioctl

2016-10-11 Thread Ruchi Kandoi
From: Greg Hackmann ION_IOC_TAG provides a userspace interface for tagging buffers with their memtrack usage after allocation. Signed-off-by: Ruchi Kandoi --- drivers/staging/android/ion/ion-ioctl.c | 17 + drivers/staging/android/uapi/ion.h | 25

[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

[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 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

[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 Signed-off-by: Ruchi Kandoi --- drivers/android/binder.c | 4 ++-- fs/file.c| 38 +- fs/open.c

[PATCH v2] timekeeping: Prints the amounts of time spent during suspend

2016-08-11 Thread Ruchi Kandoi
This helps to keep track of real time while debugging using kernel logs. Cc: John Stultz <john.stu...@linaro.org> Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- Changelog since v1: - removed cross platform warnings. kernel/time/timekeeping_debug.c | 2 ++ 1 file changed,

[PATCH v2] timekeeping: Prints the amounts of time spent during suspend

2016-08-11 Thread Ruchi Kandoi
This helps to keep track of real time while debugging using kernel logs. Cc: John Stultz Signed-off-by: Ruchi Kandoi --- Changelog since v1: - removed cross platform warnings. kernel/time/timekeeping_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/timekeeping_debug.c

[PATCH] timekeeping: Prints the amounts of time spent during suspend

2016-08-11 Thread Ruchi Kandoi
This helps to keep track of real time while debugging using kernel logs. Cc: John Stultz <john.stu...@linaro.org> Signed-off-by: Ruchi Kandoi <kandoiru...@google.com> --- kernel/time/timekeeping_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/timekeepi

[PATCH] timekeeping: Prints the amounts of time spent during suspend

2016-08-11 Thread Ruchi Kandoi
This helps to keep track of real time while debugging using kernel logs. Cc: John Stultz Signed-off-by: Ruchi Kandoi --- kernel/time/timekeeping_debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c index f6bd652

Re: [PATCH v2 0/2] Adds cpu power accounting per-pid basis.

2015-05-28 Thread Ruchi Kandoi
On Thu, May 21, 2015 at 7:34 AM, Daniel Lezcano wrote: > Hi Ruchi, > > On 05/15/2015 02:12 AM, Ruchi Kandoi wrote: >> >> These patches add a mechanism which will accurately caculate the CPU power >> used by all the processes in the system. In order to account f

Re: [PATCH v2 0/2] Adds cpu power accounting per-pid basis.

2015-05-28 Thread Ruchi Kandoi
On Thu, May 21, 2015 at 7:34 AM, Daniel Lezcano daniel.lezc...@linaro.org wrote: Hi Ruchi, On 05/15/2015 02:12 AM, Ruchi Kandoi wrote: These patches add a mechanism which will accurately caculate the CPU power used by all the processes in the system. In order to account for the power used

Re: [PATCH 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

2015-05-18 Thread Ruchi Kandoi
On Fri, May 15, 2015 at 9:07 AM, Peter Zijlstra wrote: > > On Thu, May 14, 2015 at 04:55:48PM -0700, Ruchi Kandoi wrote: > > cpu_power has been added to keep track of amount of power each task is > > consuming. cpu_power is updated whenever stime and utime are updated for

Re: [PATCH v2 0/2] Adds cpu power accounting per-pid basis.

2015-05-18 Thread Ruchi Kandoi
On Thu, May 14, 2015 at 11:34 PM, Heinrich Schuchardt wrote: > > On 15.05.2015 02:12, Ruchi Kandoi wrote: > > These patches add a mechanism which will accurately caculate the CPU power > > used by all the processes in the system. In order to account for the power > > u

Re: [PATCH v2 0/2] Adds cpu power accounting per-pid basis.

2015-05-18 Thread Ruchi Kandoi
On Thu, May 14, 2015 at 11:34 PM, Heinrich Schuchardt xypron.g...@gmx.de wrote: On 15.05.2015 02:12, Ruchi Kandoi wrote: These patches add a mechanism which will accurately caculate the CPU power used by all the processes in the system. In order to account for the power used by all

Re: [PATCH 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

2015-05-18 Thread Ruchi Kandoi
On Fri, May 15, 2015 at 9:07 AM, Peter Zijlstra pet...@infradead.org wrote: On Thu, May 14, 2015 at 04:55:48PM -0700, Ruchi Kandoi wrote: cpu_power has been added to keep track of amount of power each task is consuming. cpu_power is updated whenever stime and utime are updated for a task

Re: [PATCH v2 1/2] cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state

2015-05-15 Thread Ruchi Kandoi
On Thu, May 14, 2015 at 7:48 PM, Viresh Kumar wrote: > I am not replying for concept here, as sched maintainers are in a > better position for that, but a nit below.. > > On 14-05-15, 17:12, Ruchi Kandoi wrote: >> Adds the sysfs file for userspace to initialize the active

Re: [PATCH v2 1/2] cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state

2015-05-15 Thread Ruchi Kandoi
On Thu, May 14, 2015 at 7:48 PM, Viresh Kumar viresh.ku...@linaro.org wrote: I am not replying for concept here, as sched maintainers are in a better position for that, but a nit below.. On 14-05-15, 17:12, Ruchi Kandoi wrote: Adds the sysfs file for userspace to initialize the active current

[PATCH v2 1/2] cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state

2015-05-14 Thread Ruchi Kandoi
Adds the sysfs file for userspace to initialize the active current values for all the cores at each of the frequencies. The format for storing the values is as follows: echo "CPU:= =,CPU: ..." > /sys/devices/system/cpu/cpufreq/current_in_state Signed-off-by: Ruchi Kandoi --- dr

[PATCH v2 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

2015-05-14 Thread Ruchi Kandoi
frequency. Signed-off-by: Ruchi Kandoi --- drivers/cpufreq/cpufreq_stats.c | 28 include/linux/cpufreq.h | 8 include/linux/sched.h | 2 ++ kernel/fork.c | 1 + kernel/sched/cputime.c | 7 +++ 5 files changed

[PATCH v2 0/2] Adds cpu power accounting per-pid basis.

2015-05-14 Thread Ruchi Kandoi
he current numbers for each of the CPU core at each frequency. This will be initialized during init time. Ruchi Kandoi (2): cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state sched: cpufreq: Adds a field cpu_power in the task_struct drivers/cpufreq/cpufr

[PATCH 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

2015-05-14 Thread Ruchi Kandoi
frequency. Signed-off-by: Ruchi Kandoi --- drivers/cpufreq/cpufreq_stats.c | 23 +++ include/linux/cpufreq.h | 8 include/linux/sched.h | 2 ++ kernel/fork.c | 1 + kernel/sched/cputime.c | 7 +++ 5 files changed, 41

[PATCH 1/2] cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state

2015-05-14 Thread Ruchi Kandoi
Adds the sysfs file for userspace to initialize the active current values for all the cores at each of the frequencies. The format for storing the values is as follows: echo "CPU:= =,CPU: ..." > /sys/devices/system/cpu/cpufreq/current_in_state Signed-off-by: Ruchi Kandoi --- dr

[PATCH 0/2] Adds cpu power accounting per-pid basis.

2015-05-14 Thread Ruchi Kandoi
he current numbers for each of the CPU core at each frequency. This will be initialized during init time. Ruchi Kandoi (2): cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state sched: cpufreq: Adds a field cpu_power in the task_struct drivers/cpufreq/cpufr

[PATCH 1/2] cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state

2015-05-14 Thread Ruchi Kandoi
-by: Ruchi Kandoi kandoiru...@google.com --- drivers/cpufreq/cpufreq_stats.c | 163 +++- 1 file changed, 161 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 5e370a3..6f0b562 100644 --- a/drivers/cpufreq

[PATCH 0/2] Adds cpu power accounting per-pid basis.

2015-05-14 Thread Ruchi Kandoi
numbers for each of the CPU core at each frequency. This will be initialized during init time. Ruchi Kandoi (2): cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state sched: cpufreq: Adds a field cpu_power in the task_struct drivers/cpufreq/cpufreq_stats.c | 186

[PATCH v2 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

2015-05-14 Thread Ruchi Kandoi
frequency. Signed-off-by: Ruchi Kandoi kandoiru...@google.com --- drivers/cpufreq/cpufreq_stats.c | 28 include/linux/cpufreq.h | 8 include/linux/sched.h | 2 ++ kernel/fork.c | 1 + kernel/sched/cputime.c | 7

[PATCH v2 0/2] Adds cpu power accounting per-pid basis.

2015-05-14 Thread Ruchi Kandoi
numbers for each of the CPU core at each frequency. This will be initialized during init time. Ruchi Kandoi (2): cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state sched: cpufreq: Adds a field cpu_power in the task_struct drivers/cpufreq/cpufreq_stats.c | 191

[PATCH 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

2015-05-14 Thread Ruchi Kandoi
frequency. Signed-off-by: Ruchi Kandoi kandoiru...@google.com --- drivers/cpufreq/cpufreq_stats.c | 23 +++ include/linux/cpufreq.h | 8 include/linux/sched.h | 2 ++ kernel/fork.c | 1 + kernel/sched/cputime.c | 7 +++ 5

[PATCH v2 1/2] cpufreq_stats: Adds sysfs file /sys/devices/system/cpu/cpufreq/current_in_state

2015-05-14 Thread Ruchi Kandoi
-by: Ruchi Kandoi kandoiru...@google.com --- drivers/cpufreq/cpufreq_stats.c | 163 +++- 1 file changed, 161 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 5e370a3..6f0b562 100644 --- a/drivers/cpufreq

[PATCH] suspend: Return error when pending wakeup source is found.

2015-05-07 Thread Ruchi Kandoi
If a wakeup source is found to be pending in the last stage of suspend after syscore suspend then the device doesn't suspend but the error is not propogated which causes an error in the accounting for the number of suspend aborts and successful suspends. Signed-off-by: Ruchi Kandoi --- kernel

[PATCH] suspend: Return error when pending wakeup source is found.

2015-05-07 Thread Ruchi Kandoi
If a wakeup source is found to be pending in the last stage of suspend after syscore suspend then the device doesn't suspend but the error is not propogated which causes an error in the accounting for the number of suspend aborts and successful suspends. Signed-off-by: Ruchi Kandoi kandoiru

Re: [PATCH v3] power: add an API to log wakeup reasons

2014-03-13 Thread Ruchi Kandoi
logging for debugging purposes. On Thu, Mar 13, 2014 at 6:06 PM, Rafael J. Wysocki wrote: > On Thursday, March 13, 2014 05:43:20 PM Ruchi Kandoi wrote: >> This should be true most of the times. >> >> But there might be cases otherwise too. >> >> For instance, t

Re: [PATCH v3] power: add an API to log wakeup reasons

2014-03-13 Thread Ruchi Kandoi
only because the system was up and did not cause the wake up to happen. Regards, Ruchi Kandoi On Thu, Mar 13, 2014 at 3:18 PM, Rafael J. Wysocki wrote: > Hi, > > I saw the v4, but I don't have it handy, so replying here. > > On Wednesday, March 12, 2014 12:46:38 PM Ruc

[PATCH v4] power: add an API to log wakeup reasons

2014-03-13 Thread Ruchi Kandoi
of the accounting kept on power consumption. Signed-off-by: Ruchi Kandoi Signed-off-by: Greg Hackmann --- space added after prefix in the pr_fmt() --- include/linux/wakeup_reason.h | 23 +++ kernel/power/Makefile | 2 +- kernel/power/wakeup_reason.c | 141

[PATCH v4] power: add an API to log wakeup reasons

2014-03-13 Thread Ruchi Kandoi
of the accounting kept on power consumption. Signed-off-by: Ruchi Kandoi kandoiru...@google.com Signed-off-by: Greg Hackmann ghackm...@google.com --- space added after prefix in the pr_fmt() --- include/linux/wakeup_reason.h | 23 +++ kernel/power/Makefile | 2 +- kernel/power

Re: [PATCH v3] power: add an API to log wakeup reasons

2014-03-13 Thread Ruchi Kandoi
only because the system was up and did not cause the wake up to happen. Regards, Ruchi Kandoi On Thu, Mar 13, 2014 at 3:18 PM, Rafael J. Wysocki r...@rjwysocki.net wrote: Hi, I saw the v4, but I don't have it handy, so replying here. On Wednesday, March 12, 2014 12:46:38 PM Ruchi Kandoi wrote

Re: [PATCH v3] power: add an API to log wakeup reasons

2014-03-13 Thread Ruchi Kandoi
logging for debugging purposes. On Thu, Mar 13, 2014 at 6:06 PM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Thursday, March 13, 2014 05:43:20 PM Ruchi Kandoi wrote: This should be true most of the times. But there might be cases otherwise too. For instance, there was a bug earlier

[PATCH v3] power: add an API to log wakeup reasons

2014-03-12 Thread Ruchi Kandoi
of the accounting kept on power consumption. Signed-off-by: Ruchi Kandoi Signed-off-by: Greg Hackmann --- commit message changed for clarity --- include/linux/wakeup_reason.h | 23 +++ kernel/power/Makefile | 2 +- kernel/power/wakeup_reason.c | 141

[PATCH v3] power: add an API to log wakeup reasons

2014-03-12 Thread Ruchi Kandoi
of the accounting kept on power consumption. Signed-off-by: Ruchi Kandoi kandoiru...@google.com Signed-off-by: Greg Hackmann ghackm...@google.com --- commit message changed for clarity --- include/linux/wakeup_reason.h | 23 +++ kernel/power/Makefile | 2 +- kernel/power

Re: [PATCH] power: add an API to log wakeup reasons

2014-03-11 Thread Ruchi Kandoi
you, Ruchi Kandoi On Tue, Mar 11, 2014 at 12:32 PM, Rafael J. Wysocki wrote: > On Monday, March 10, 2014 07:02:02 PM Ruchi Kandoi wrote: >> Add API log_wakeup_reason() and expose it to userspace via sysfs path >> /sys/kernel/wakeup_reasons/last_resume_reason >> This is useful

Re: [PATCH] power: add an API to log wakeup reasons

2014-03-11 Thread Ruchi Kandoi
you, Ruchi Kandoi On Tue, Mar 11, 2014 at 12:32 PM, Rafael J. Wysocki r...@rjwysocki.net wrote: On Monday, March 10, 2014 07:02:02 PM Ruchi Kandoi wrote: Add API log_wakeup_reason() and expose it to userspace via sysfs path /sys/kernel/wakeup_reasons/last_resume_reason This is useful for power

[PATCH] power: add an API to log wakeup reasons

2014-03-10 Thread Ruchi Kandoi
Add API log_wakeup_reason() and expose it to userspace via sysfs path /sys/kernel/wakeup_reasons/last_resume_reason This is useful for power management diagnostic purposes. Signed-off-by: Ruchi Kandoi Signed-off-by: Greg Hackmann --- include/linux/wakeup_reason.h | 23 +++ kernel/power

[PATCH] power: add an API to log wakeup reasons

2014-03-10 Thread Ruchi Kandoi
Add API log_wakeup_reason() and expose it to userspace via sysfs path /sys/kernel/wakeup_reasons/last_resume_reason This is useful for power management diagnostic purposes. Signed-off-by: Ruchi Kandoi kandoiru...@google.com Signed-off-by: Greg Hackmann ghackm...@google.com --- include/linux