From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH] Fix running failure when > 69 CPUs for open file limitation
Date: Thu, 30 May 2013 00:20:17 +0300 [thread overview]
Message-ID: <20130529212016.GB3075@swordfish> (raw)
In-Reply-To: 1369842247-11442-1-git-send-email-youquan.song@intel.com
[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]
On (05/29/13 11:44), Youquan Song wrote:
> Powertop 2.3 fails to run on machine with > 69 CPUs because system open files
> limitation of one process is 1024 default, While powertop will open one file
> for every monitored perf_event (at least 15) each CPU.
>
how about, say, 2048? unlimited resource steals possibility to detect
error/bug/leak/etc.
and let's make rlimit change after checkroot() call.
-ss
> Like on 80 CPUs Westmere-EX machine, powertop will fail to run with below:
>
> PowerTOP v2.3 needs the kernel to support the 'perf' subsystem
> as well as support for trace points in the kernel:
> CONFIG_PERF_EVENTS=y
> CONFIG_PERF_COUNTERS=y
> CONFIG_TRACEPOINTS=y
> CONFIG_TRACING=y
>
> This patch is to change RLIMIT_NOFILE from default (1024) to max limition.
>
>
> Signed-off-by: Youquan Song <youquan.song(a)intel.com>
> ---
> src/main.cpp | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/src/main.cpp b/src/main.cpp
> index 0883424..8cd97a2 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,9 +284,14 @@ static void powertop_init(void)
> static char initialized = 0;
> int ret;
> struct statfs st_fs;
> + struct rlimit rlmt;
>
> if (initialized)
> return;
> +
> + getrlimit (RLIMIT_NOFILE, &rlmt);
> + rlmt.rlim_cur = rlmt.rlim_max;
> + setrlimit (RLIMIT_NOFILE, &rlmt);
>
> checkroot();
> ret = system("/sbin/modprobe cpufreq_stats > /dev/null 2>&1");
>
next reply other threads:[~2013-05-29 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 21:20 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-04 10:26 [Powertop] [PATCH] Fix running failure when > 69 CPUs for open file limitation Sergey Senozhatsky
2013-06-04 10:19 Sergey Senozhatsky
2013-05-29 21:00 Sergey Senozhatsky
2013-05-29 15:44 Youquan Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130529212016.GB3075@swordfish \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.