public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: David Ahern <dsahern@gmail.com>
Cc: kan.liang@intel.com, linux-kernel@vger.kernel.org,
	ying.huang@intel.com, andi@firstfloor.org
Subject: Re: [PATCH V3 1/2] perf,tools: add time out to force stop proc map processing
Date: Wed, 17 Jun 2015 14:53:02 -0300	[thread overview]
Message-ID: <20150617175302.GC3079@kernel.org> (raw)
In-Reply-To: <55819AB3.9060308@gmail.com>

Em Wed, Jun 17, 2015 at 10:05:07AM -0600, David Ahern escreveu:
> On 6/17/15 1:56 AM, kan.liang@intel.com wrote:
> >diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
> >index 793b150..ac6cf2a 100644
> >--- a/tools/perf/util/event.c
> >+++ b/tools/perf/util/event.c
> >@@ -213,6 +213,8 @@ static int perf_event__synthesize_fork(struct perf_tool *tool,
> >  	return 0;
> >  }

> >+#define MMAP_TIMEOUT	(50 * 1000000ULL)
 
> How did you determine 50msec is a good time? This seems really low to me
> considering the range of platforms supported by perf and various run time
> conditions. The default needs to work right on all platforms.
 
> Why not have the default be infinity and users who need the feature use the
> option provided in patch 2?

Don't think that is a reasonable approach, how would be the workflow,
something like:

1) Fire up 'perf top'

2) Wait a long time.... maybe something is wrong, I guess I better
   exit, press Q, no response, ok, I think I'll kill this bugger

3) Read docs, etc, ah! That is it! --proc-map-timeout! How couldn't I
   think of that?

8-)

I think limiting this to say, half a second is ok, and the message about
the truncation happening surely suggests using --proc-map-timeout,
right?

Also please rename this MMAP_TIMEOUT define, this is not about a timeout
for a mmap operation, it is a timeout for parsing the proc mmap info,
i.e. something like:

#define PROC_MAP_PARSE_TIMEOUT  (50 * 1000000ULL)

Clarifies this and doesn't pollutes ctags like tools.

Thanks

- Arnaldo

      parent reply	other threads:[~2015-06-17 17:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17  7:56 [PATCH V3 1/2] perf,tools: add time out to force stop proc map processing kan.liang
2015-06-17  7:56 ` [PATCH V3 2/2] perf,tools: configurable per thread proc map processing time out kan.liang
2015-06-17 16:05 ` [PATCH V3 1/2] perf,tools: add time out to force stop proc map processing David Ahern
2015-06-17 17:19   ` Liang, Kan
2015-06-17 17:53   ` Arnaldo Carvalho de Melo [this message]

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=20150617175302.GC3079@kernel.org \
    --to=acme@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ying.huang@intel.com \
    /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