[PATCH PM-QA] heat_cpu: fix race condition

2014-07-14 Thread Mohammad Merajul Islam Molla
igned-off-by: Mohammad Merajul Islam Molla --- utils/heat_cpu.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/utils/heat_cpu.c b/utils/heat_cpu.c index 02e0b6d..716cd56 100644 --- a/utils/heat_cpu.c +++ b/utils/heat_cpu.c @@ -47,17 +

Re: [PATCH] Add pinctrl support in powerdebug

2014-07-07 Thread Mohammad Merajul Islam Molla
Hello Amit/Sanjay, Did you get a chance to look at the patch? -- Thanks, -Meraj On Mon, Jun 30, 2014 at 2:06 PM, Mohammad Merajul Islam Molla wrote: > Add support for pinctrl in powerdebug. Both dump and display > modes supported. Tested only on Samsung Arndale board. > > Samp

Regarding powertop VFS ops/sec output

2014-07-06 Thread Mohammad Merajul Islam Molla
Hello, It looks like powertop requires a kernel patch to display VFS ops/sec. The last patch was for kernel v3.3.0. The patch needs to be updated, otherwise powertop always displays 0 VFS ops/sec. Considering changes starting with kernel v3.9, the kernel side patch would look like as below. I hav

Re: [Powertop] [PATCH POWERTOP] Fix various resource leaks

2014-07-02 Thread Mohammad Merajul Islam Molla
Freq stats" tab and powertop version shows 2.6.1. On Tue, Jul 1, 2014 at 6:47 PM, Sergey Senozhatsky wrote: > On (07/01/14 17:54), Amit Kucheria wrote: >> Date: Tue, 1 Jul 2014 17:54:15 +0530 >> From: Amit Kucheria >> To: Mohammad Merajul Islam Molla , >> power...@

[PATCH] Add pinctrl support in powerdebug

2014-06-30 Thread Mohammad Merajul Islam Molla
tp://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Mohammad Merajul Islam Molla + * (Samsung R&D Institute Bangladesh) + * - initial API and implementation + ***

pinctrl support in powerdebug

2014-06-29 Thread Mohammad Merajul Islam Molla
Hello Amit, As discussed, I made a patch to support pinctrl in powerdebug. It will display the below information - Pin Name MUX Owner GPIO Owner HOG Function Group Both dump and display modes are supported. Only tested on Samsung Arndale board. Patch attache

[PATCH POWERTOP] Fix various resource leaks

2014-06-26 Thread Mohammad Merajul Islam Molla
Fixes some resource leaks detected by valgrind and coverity scan. diff --git a/src/devices/ahci.cpp b/src/devices/ahci.cpp index ac06460..7f704b6 100644 --- a/src/devices/ahci.cpp +++ b/src/devices/ahci.cpp @@ -64,8 +64,10 @@ static string disk_name(char *path, char *target, char *shortname)

[PATCH POWERTOP] Remove temporary file created during calibration

2014-06-26 Thread Mohammad Merajul Islam Molla
powertop creates temporary file in /tmp folder during calibration. Simply closing does not remove these files. Instead use unlink to remove the file. diff --git a/src/calibrate/calibrate.cpp b/src/calibrate/calibrate.cpp index db368e0..1336c3f 100644 --- a/src/calibrate/calibrate.cpp +++ b/src/cal

Re: idlestat: irq count reported is wrong

2014-06-20 Thread Mohammad Merajul Islam Molla
core. > When the core is already running we do not care > about number of interrupts its getting. > Thanks > Sandeep > > > > On 20 June 2014 14:39, Mohammad Merajul Islam Molla > wrote: >> >> Hello Sandeep, >> >> Thanks for reply. >>

Re: idlestat: irq count reported is wrong

2014-06-20 Thread Mohammad Merajul Islam Molla
be spurious wakeups in some systems. ie: core exiting idle > without an irq. > > Thanks > Sandeep > > > On 20 June 2014 13:58, Mohammad Merajul Islam Molla > wrote: >> >> Hello Amit/Daniel, >> >> I think there is a bug in idlestat due to which it repo

idlestat: irq count reported is wrong

2014-06-20 Thread Mohammad Merajul Islam Molla
Hello Amit/Daniel, I think there is a bug in idlestat due to which it reports wrong irq counts in output. Log is 9.998478 secs long with 1518 events clusterA@state hits total(us) avg(us) min(us) max(us) C6-SNB 455 9921571.0021805.65 0.00176303.00

idlestat recent fix related query

2014-06-19 Thread Mohammad Merajul Islam Molla
Recently there was a patch (commit f5b9bdcb530a8871e6c65a617d41001b39bf4912), to fix resource leak on dir_topology. Now, the below code segment is either unnecessary or it should call opendir on 'newpath' instead of 'path'? dir_topology = opendir(path);

[PATCH POWERDEBUG] Fix resource leaks in export_free_gpios()

2014-06-19 Thread Mohammad Merajul Islam Molla
Fix for the below issues - 1. valgrind reports memory leaks in export_free_gpios. 'line' pointer was never freed. ==5732== 120 bytes in 1 blocks are definitely lost in loss record 130 of 271 ==5732==at 0x482CBB8: malloc (vg_replace_malloc.c:270) ==5732==by 0x48CC633: getd

[PATCH POWERDEBUG] display free gpios info

2014-06-08 Thread Mohammad Merajul Islam Molla
- Displays information about free gpios by exporting & unexporting Also, attached. diff --git a/gpio.c b/gpio.c index 4a42cb7..eb69f56 100644 --- a/gpio.c +++ b/gpio.c @@ -46,6 +46,7 @@ struct gpio_info { static struct tree *gpio_tree = NULL; static bool gpio_error = false; +int gpio_max;

[PATCH IDLESTAT] minor fixes

2014-06-08 Thread Mohammad Merajul Islam Molla
Patch to fix some minor issues in idlestat tool - - use USEC_PER_SEC instead of hardcoded value - replace 'f' with 'stderr' - check for root only if idlestat is run in trace mode - increase MAXCSTATE & MAXPSTATE to 16 as per Daniel's suggestion. Needs to be dynamically determined in fu

Re: [idlestat 2/6] Print more details when fopen fails

2014-06-03 Thread Mohammad Merajul Islam Molla
Hello Amit, In the last section f should be 'stderr' in fprintf - @@ -1080,8 +1082,9 @@ static int idlestat_store(const char *path) return -1; f = fopen(path, "w+"); + if (!f) { - fprintf(f, "failed to open '%s': %m\n", path); + fprintf

[PATCH IDLESTAT] fix execute() function

2014-06-03 Thread Mohammad Merajul Islam Molla
Patch to fix the below two issues - 1. Fix the part where parent waits to fetch child status. In case SIGALRM is received, fetch new status after killing child so that subsequent check for termination status passes. 2. In case of normal termination, just check if program exited normally (checking

idlestat: execute() function problems?

2014-06-03 Thread Mohammad Merajul Islam Molla
Hello, I noticed some odd behaviors with idlestate.c/execute() function. 1. I wrote a sample program hello.c with infinite loop - int main() { while(1); } #sudo ../idlestat/idlestat -o /tmp/myoutput ../temp/hello idlestat never terminates, because there is no alarm

Re: [PATCH POWERDEBUG] gpio: expose free gpios to user

2014-06-02 Thread Mohammad Merajul Islam Molla
Hello Sanjay, One point - should powerdebug unexport these free gpios when it exits? Otherwise, all the entries will remain in /sys/class/gpio/* and /sys/kernel/debug/gpio file until next reboot which user may not want. -- Thanks, - Meraj On Mon, Jun 2, 2014 at 2:46 PM, Sanjay Singh Rawat wro

idlestat: possible bug?

2014-06-02 Thread Mohammad Merajul Islam Molla
Hi I was trying to run idlestat and with the below command output is - # sudo ./idlestat -o /tmp/myoutput fopen: No such file or directory I looked into the source and it looks like its not entering in the if condition in main - 1212 /* Acquisition time specified means we will get the t

Confusion Regarding Powerdebug Sensors Info on i386

2014-05-29 Thread Mohammad Merajul Islam Molla
Hello, I ran powerdebug on i386 (ubuntu 13.04) and it seems its outputting wrong information in "Sensors" info page. Suspects are colored blue below - # sudo ./powerdebug PowerDebug 0.7.2 Clocks Regulators Sensors Gpio NameValue coretemp temp1_crit_alarm

[PATCH] pm-qa/powertop test fails on ARM

2014-05-15 Thread Mohammad Merajul Islam Molla
Hello, pm-qa/powertop test fails on ARM, even though it succeeds for Intel. on both platforms, powertop installed using command - "sudo apt-get install powertop" powertop_01.1: checking if reports are generated... Ok [on Intel] powertop_01.1: checking if reports are generated... Err [on ARM] It

pm-qa/heat_cpu.c: Some Issues

2014-05-14 Thread Mohammad Merajul Islam Molla
Hello Amit/Robert/Others, I was looking into the code for heat_cpu.c in pm-qa. I think there are some issues with the current implementation. Please find details below - 1. #define NR_THREAD 3 pid_t thr_id[NR_THREAD]; I think the array thr_id should be dynamically allocated as numbe

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

2014-05-12 Thread Mohammad Merajul Islam Molla
://lists.linaro.org/pipermail/linaro-dev/2014-May/017144.html http://lists.linaro.org/pipermail/linaro-dev/2014-May/017146.html -- ​Thanks, -Meraj​ Mohammad Merajul Islam Molla (Meraj) Mobile Lab 1, Mobile Development Team Samsung R&D Institute Bangladesh (SRBD) Phone: +880-1754380207 Skype: mmm2177 ​

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

2014-05-07 Thread Mohammad Merajul Islam Molla
duration: 120.057430 secs deviation 0.000479 deviation 0.000478 counter value 411037603 test duration: 120.062716 secs deviation 0.000523 -- Thanks, -Meraj On Fri, May 2, 2014 at 11:23 PM, Sanjay Singh Rawat wrote: > On Wednesday 30 April 2014 02:04 PM, Mohammad Merajul Islam Molla wr

[PATCH[ Cross-compile support in Powerdebug Makefile

2014-05-06 Thread Mohammad Merajul Islam Molla
Adding support for cross-compilation in powerdebug Makefile. diff --git a/Makefile b/Makefile index 2da9d67..d7c5394 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ BINDIR=/usr/sbin MANDIR=/usr/share/man/man8 CFLAGS?=-O1 -g -Wall -Wshadow -CC?=gcc +LD = $(CROSS_COMPILE)ld +CC = $(C

Re: Powertop Bugs on ARM [1311381, 1316096]

2014-05-06 Thread Mohammad Merajul Islam Molla
diff? > > Also, we'll need to come up with a better solution that to add the > "Samsung" string in there before we submit this upstream. > > Regards, > Amit > > On Tue, May 6, 2014 at 11:06 AM, Mohammad Merajul Islam Molla > wrote: > > Hello, >

[PATCH] Powertop Bugs on ARM [1311381, 1316096]

2014-05-06 Thread Mohammad Merajul Islam Molla
Patch for powertop bugs 1311281, 1316906. Details here - http://lists.linaro.org/pipermail/linaro-dev/2014-May/017142.html http://lists.linaro.org/pipermail/linaro-dev/2014-May/017143.html diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp index 4a7e197..140d7ed 100644 --- a/src/cpu/cpu.cpp +++ b/

Fwd: [PATCH]: PowerTOP README file needs to be updated

2014-05-04 Thread Mohammad Merajul Islam Molla
Re-sending adding some more recipients. -- Forwarded message -- From: Mohammad Merajul Islam Molla Date: Tue, Apr 29, 2014 at 5:07 PM Subject: [PATCH]: PowerTOP README file needs to be updated To: linaro-dev@lists.linaro.org Hello, It looks like README file in powertop branch

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

2014-04-30 Thread Mohammad Merajul Islam Molla
2: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 b

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]: PowerTOP README file needs to be updated

2014-04-29 Thread Mohammad Merajul Islam Molla
Hello, It looks like README file in powertop branch is out of sync with how powertop should be actually built. It should be updated. diff --git a/README b/README index 2961eba..d83b315 100644 --- a/README +++ b/README @@ -2,9 +2,10 @@ -- To build and install PowerT

[PATCH] Output format of powerdebug is messed up on Samsung Arndale Board

2014-04-21 Thread Mohammad Merajul Islam Molla
Hello, This is for launchpad bug 1307896 ( https://bugs.launchpad.net/linaro-powerdebug/+bug/1307896). While displaying information about "Regulators" output becomes really messy (zig zag) on Samsung Arndale Board (Exynos 5250, Cortex A-15). It looks like the output field size "11" for printing r