powertop kernel config requirements
by cornel panceac
After packaging powertop (actually shamelessly stealing .spec and patches
from fedora 18), i get this:
> powertop
Failed to mount debugfs!
exiting...
Looking in the README included in the 2.4 tarball, i do not see debugfs on
the list of requirement. Is there a place where we can read the complete
list of requirements?
Thank you,
Cornel
9 years
Arrow keys don't work as expected in Powertop 2.3
by Jordan Grigorov
Hello,
I just compiled powertop 2.3 from source. The problem is am not able to switch tabs when the program is started. For example, when I click the right arrow key instead of opening 'Idle stats' the text in the terminal moves to the left.
I am not very experienced but I suppose it could be something related to ncurses. I am using ncurse v 5.9. I just compiled it from source too.
What is interesting is that when I use an older version (powertop 2) there is no such problem.
I am using Kali linux i686 v3.7.2. I can't think of any more useful information to give at the moment
9 years
Outdated autotools helper files
by Julian Wollrath
Hello,
in the 2.3 release you are using config.guess and config.sub files
older than April of 2012. This means, that powertop will probably not
build correctly on ARM64. So please consider switching to a newer
autotools version for your next release. Thanks.
With best regards,
Julian Wollrath
9 years
Re: [Powertop] [PATCH] Fix running failure when > 69 CPUs for open file limitation
by Sergey Senozhatsky
On (06/04/13 17:31), Youquan Song wrote:
> >
> > how about, say, 2048? unlimited resource steals possibility to detect
> > error/bug/leak/etc.
>
> I do not like it. If there are more CPUs on larger machine and if we
> want to monitor more performance event for each CPU, the 2048 settting will
> be another issue.
>
we may get the number of CPUs, multiply it by events number + probably add some
extra fds, and set it as a limit. this is not a really big issue, though. my point
is that limited resource gives us better chances to detect resource leak in
powertop, however I agree that we just may fireup valgrind for that purpose.
-ss
> We just set it to the rlim_cur to rlim_max for the powertop application
> and to cater to powertop requirement as large as possible.
>
> > and let's make rlimit change after checkroot() call.
> >
>
> Good point. Agree. Here is the modified patch.
>
>
> diff --git a/src/main.cpp b/src/main.cpp
> index 0883424..d24a3db 100644
> --- a/src/main.cpp
> +++ b/src/main.cpp
> @@ -36,6 +36,7 @@
> #include <getopt.h>
> #include <unistd.h>
> #include <locale.h>
> +#include <sys/resource.h>
>
> #include "cpu/cpu.h"
> #include "process/process.h"
> @@ -283,11 +284,17 @@ static void powertop_init(void)
> static char initialized = 0;
> int ret;
> struct statfs st_fs;
> + struct rlimit rlmt;
>
> if (initialized)
> return;
>
> checkroot();
> +
> + getrlimit (RLIMIT_NOFILE, &rlmt);
> + rlmt.rlim_cur = rlmt.rlim_max;
> + setrlimit (RLIMIT_NOFILE, &rlmt);
> +
> ret = system("/sbin/modprobe cpufreq_stats > /dev/null 2>&1");
> ret = system("/sbin/modprobe msr > /dev/null 2>&1");
> statfs("/sys/kernel/debug", &st_fs);
>
>
>
9 years
Re: [Powertop] [PATCH] Fix running failure when > 69 CPUs for open file limitation
by Sergey Senozhatsky
On (06/04/13 17:22), Youquan Song wrote:
> >
> > Hello,
> > I'd like to ask you to try out the following patch. We leak fd in read_file().
> >
>
> No. below patch does not fix the issue. The issue happen at open too
> many files at beginning.
>
Well, the patch is a separate issue not addressing the rlimit problem directly.
We just leak fd in read_file().
-ss
> Thanks
> -Youquan
>
>
> >
> >
> > ------8<--------8<--------
> >
> > - Do not leak file descriptor in perf_bundle read_file().
> > - Clear perf event (unmap memory and close fd) on event destruction.
> >
> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>
> >
> > ---
> >
> > diff --git a/src/perf/perf.cpp b/src/perf/perf.cpp
> > index 35b4017..e919741 100644
> > --- a/src/perf/perf.cpp
> > +++ b/src/perf/perf.cpp
> > @@ -167,6 +167,7 @@ perf_event::~perf_event(void)
> > if (perf_event::pevent->ref_count == 1) {
> > pevent_free(perf_event::pevent);
> > perf_event::pevent = NULL;
> > + clear();
> > } else
> > pevent_unref(perf_event::pevent);
> > }
> > diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
> > index 38e1e91..8d480e8 100644
> > --- a/src/perf/perf_bundle.cpp
> > +++ b/src/perf/perf_bundle.cpp
> > @@ -123,6 +123,7 @@ static char * read_file(const char *file)
> > buffer[len] = '\0';
> > }
> > out:
> > + close(fd);
> > return buffer;
> > }
> >
> >
>
9 years