From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbaFLWKD (ORCPT ); Thu, 12 Jun 2014 18:10:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35937 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752499AbaFLWJ7 (ORCPT ); Thu, 12 Jun 2014 18:09:59 -0400 From: Jiri Olsa To: linux-kernel@vger.kernel.org Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Corey Ashford , David Ahern , Frederic Weisbecker , Ingo Molnar , Jean Pihet , Namhyung Kim , Paul Mackerras , Peter Zijlstra Subject: [PATCH 16/17] perf tools: Limit the ordered events queue by default to 100MB Date: Fri, 13 Jun 2014 00:08:32 +0200 Message-Id: <1402610913-19059-17-git-send-email-jolsa@kernel.org> In-Reply-To: <1402610913-19059-1-git-send-email-jolsa@kernel.org> References: <1402610913-19059-1-git-send-email-jolsa@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's still configurable by report.queue-size config option, but looks like 100MB limit is more sane than no limit at all. There's some speedup for report on huge data files: With the limit of 100 MB, I've got around 15% speedup on reporting of ~10GB perf.data file. current code: 621,685,704,665 cycles ( +- 0.52% ) 873,397,467,969 instructions ( +- 0.00% ) 286.133268732 seconds time elapsed ( +- 1.13% ) with patches: 603,933,987,185 cycles ( +- 0.45% ) 869,139,445,070 instructions ( +- 0.00% ) 245.337510637 seconds time elapsed ( +- 0.49% ) The speed up seems to be mainly in less cycles spent in servicing page faults. current code: 4.44% 0.01% perf.old [kernel.kallsyms] [k] page_fault with patches: 1.45% 0.00% perf [kernel.kallsyms] [k] page_fault current code (faults event): 6,643,807 faults ( +- 0.36% ) with patches (faults event): 2,214,756 faults ( +- 3.03% ) Also there's lower memory consuption. Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jean Pihet Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Signed-off-by: Jiri Olsa --- tools/perf/util/ordered-events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c index 80f1daa..c47475e 100644 --- a/tools/perf/util/ordered-events.c +++ b/tools/perf/util/ordered-events.c @@ -251,7 +251,8 @@ void ordered_events_queue_init(struct ordered_events_queue *q) INIT_LIST_HEAD(&q->events); INIT_LIST_HEAD(&q->cache); INIT_LIST_HEAD(&q->to_free); - q->max_alloc_size = (u64) -1; + /* 100MB limitation by default */ + q->max_alloc_size = 100 * 1024 * 1024; q->cur_alloc_size = 0; } -- 1.8.3.1