Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-05-12 Thread Mohammad Merajul Islam Molla
Hello Sanjay, You are welcome. Earlier I submitted some patches in powedebug and powertop tools. Please feel free to merge if you find any useful. http://lists.linaro.org/pipermail/linaro-dev/2014-April/017117.html http://lists.linaro.org/pipermail/linaro-dev/2014-May/017141.html http://lists.li

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-05-12 Thread Sanjay Singh Rawat
On Wednesday 07 May 2014 03:34 PM, Mohammad Merajul Islam Molla wrote: Hello Sanjay, One suggestion - its probably better to precede the output lines with cpu no. As currently output from child processes are intermixed as below and difficult to co-relate. jiffies are : 1 usecs found 4 cpu(s

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-05-07 Thread Mohammad Merajul Islam Molla
Hello Sanjay, One suggestion - its probably better to precede the output lines with cpu no. As currently output from child processes are intermixed as below and difficult to co-relate. jiffies are : 1 usecs found 4 cpu(s) duration: 120 secs, #sleep: 1200, delay: 10 us duration: 120 secs,

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-05-02 Thread Sanjay Singh Rawat
On Wednesday 30 April 2014 02:04 PM, Mohammad Merajul Islam Molla wrote: Hello Sanjay, As far I know, if option argument is 0, the parent will wait for Looks like waiting is done if childs exit. I checked for the offlined CPU case, if there are no child processes, waitpid returns -1. Setting

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-05-02 Thread Daniel Lezcano
On 04/30/2014 10:34 AM, Mohammad Merajul Islam Molla wrote: Hello Sanjay, As far I know, if option argument is 0, the parent will wait for specified child pid to terminate, its not for immediate return as in case of WNOHANG. This is probably the intended use of the code (author will be able to co

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-04-30 Thread Mohammad Merajul Islam Molla
Hello Sanjay, As far I know, if option argument is 0, the parent will wait for specified child pid to terminate, its not for immediate return as in case of WNOHANG. This is probably the intended use of the code (author will be able to confirm). Changing 0 to WNOHANG macro will change the meaning o

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-04-30 Thread Sanjay Singh Rawat
On Wednesday 30 April 2014 12:14 PM, Mohammad Merajul Islam Molla wrote: Hello, I would like to share two observations - 1. Is it necessary to initialize nrcpus = 2 anymore? thanks, ack 2. Another problem may happen in the code below where waitpid is called - for (i = 0; i < nrcpus; i++)

Re: [PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-04-29 Thread Mohammad Merajul Islam Molla
Hello, I would like to share two observations - 1. Is it necessary to initialize nrcpus = 2 anymore? 2. Another problem may happen in the code below where waitpid is called - for (i = 0; i < nrcpus; i++) { int status; waitpid(pids[i], &status, 0);

[PATCH PMQA] cpuidle_killer: allocate per cpu process array dynamically

2014-04-29 Thread Sanjay Singh Rawat
currently percpu process array is set to 2, which results in segfault Signed-off-by: Sanjay Singh Rawat --- cpuidle/cpuidle_killer.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c index 5e7320f..09009ef 100644 ---