Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755726AbbFQRxM (ORCPT ); Wed, 17 Jun 2015 13:53:12 -0400 Received: from mail.kernel.org ([198.145.29.136]:56952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136AbbFQRxI (ORCPT ); Wed, 17 Jun 2015 13:53:08 -0400 Date: Wed, 17 Jun 2015 14:53:02 -0300 From: Arnaldo Carvalho de Melo To: David Ahern 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 Message-ID: <20150617175302.GC3079@kernel.org> References: <1434527812-17051-1-git-send-email-kan.liang@intel.com> <55819AB3.9060308@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55819AB3.9060308@gmail.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1778 Lines: 52 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/