From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Jiri Pirko <jpirko@redhat.com>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 4/6] perf sched: Use PTHREAD_STACK_MIN to avoid pthread_attr_setstacksize() fail
Date: Mon, 10 Jan 2011 22:28:10 -0200 [thread overview]
Message-ID: <1294705692-9537-5-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1294705692-9537-1-git-send-email-acme@infradead.org>
From: Jiri Pirko <jpirko@redhat.com>
on ppc64:
/usr/include/bits/local_lim.h:#define PTHREAD_STACK_MIN 131072
therefore following set of commands:
gives:
perf.2.6.37test: builtin-sched.c:493: create_tasks: Assertion `!(err)' failed.
So make sure we do not set stack size lower than PTHREAD_STACK_MIN.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20110110160417.GB2685@psychotron.brq.redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-sched.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 54024d2..abd4b84 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -489,7 +489,8 @@ static void create_tasks(void)
err = pthread_attr_init(&attr);
BUG_ON(err);
- err = pthread_attr_setstacksize(&attr, (size_t)(16*1024));
+ err = pthread_attr_setstacksize(&attr,
+ (size_t) max(16 * 1024, PTHREAD_STACK_MIN));
BUG_ON(err);
err = pthread_mutex_lock(&start_work_mutex);
BUG_ON(err);
--
1.6.2.5
next prev parent reply other threads:[~2011-01-11 0:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 0:28 [GIT PULL 0/6] perf/urgent fixes and improvements Arnaldo Carvalho de Melo
2011-01-11 0:28 ` [PATCH 1/6] perf sched: Fix allocation result check Arnaldo Carvalho de Melo
2011-01-11 0:28 ` [PATCH 2/6] perf stat: better error message for unsupported events Arnaldo Carvalho de Melo
2011-01-11 0:28 ` [PATCH 3/6] perf tools: Emit clearer message for sys_perf_event_open ENOENT return Arnaldo Carvalho de Melo
2011-01-11 18:40 ` David Ahern
2011-01-11 18:58 ` Arnaldo Carvalho de Melo
2011-01-11 0:28 ` Arnaldo Carvalho de Melo [this message]
2011-01-11 0:28 ` [PATCH 5/6] perf evsel: Support perf_evsel__open(cpus > 1 && threads > 1) Arnaldo Carvalho de Melo
2011-01-11 0:28 ` [PATCH 6/6] perf session: Fix infinite loop in __perf_session__process_events Arnaldo Carvalho de Melo
2011-01-11 10:57 ` [GIT PULL 0/6] perf/urgent fixes and improvements Ingo Molnar
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=1294705692-9537-5-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@redhat.com \
--cc=jpirko@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®