Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10422393ybi; Wed, 24 Jul 2019 22:57:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/JjYGIMLzMRQUqzqQbQ1udOPEiBTJqpdWvhigN9u5QBWd7rzEJMTugjxjbyVIW+CGplV0 X-Received: by 2002:a62:8745:: with SMTP id i66mr14705939pfe.259.1564034231508; Wed, 24 Jul 2019 22:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564034231; cv=none; d=google.com; s=arc-20160816; b=VIvao5vOIDBBOnCwS+aajYAS3HErGo8SrpTPFcO1MWIV4sp9CjjFGd5/Yxkf+Nobib 6C9KVKdAnCpgZESuoaqGBkKE8tlvMU35uK3QBR2dAAruVwOT8EozNS7bhrJBHDV0/Syw 0TXbkjXMGXqDzFuNEJ8innVuyu3PMbjbbL6ddW6O2ohI2zWhHLBGI5tSMJv9OXTLA7Hj 8nGezvYbkHRtTCHRvUQVXlr3aJW2TRj2YVCJ+pDTBPpY7t+KpZNPKJPFbqFjtzkL0QS8 sSCfhg6TAjPk6K12ABfNtQXkjXeXGJTZ5NDRsNIWRScbLkCwA6qFSLbbuRcIhM2b1FrY z5WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9BjPiXzZOAn8okeeW2V1XwmLEdMsOx2Vhc7pqwDRrmY=; b=OdD9PT5EcaoFUzy5vrmT2g5nW/L21O7XPyWQUhDDhPG4a6a9dbx43QVCQmewAa1IAo ZTKa+rJbzFfkkLd7Nhk0i833j5363MB/KyAAjGoC6EvG/I+8feJn37lsiZeDosdcIzpF GX6POw0BRerhmunlc9rIQq3Fj271HtAAQ2Osp9mQafSXUSB8nMR/ydt62Ns9QhCt8Flj +wTt94d5IMX1IKrxjNSwV6tBGUWMboQFSrdG3Nsfrm5G18VkQkvGjoFARZ3rQRNWCG9B zMHGO2D4Yy62/ToejNk3LwEQPZ437ctFQCfYfB9y49bg0Nb9SxieouFFNRaYz9sW8Umd 4pLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wby3m7A8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cp10si15913948plb.301.2019.07.24.22.56.57; Wed, 24 Jul 2019 22:57:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wby3m7A8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404065AbfGYFj0 (ORCPT + 99 others); Thu, 25 Jul 2019 01:39:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:53556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404050AbfGYFjX (ORCPT ); Thu, 25 Jul 2019 01:39:23 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D6E122C7C; Thu, 25 Jul 2019 05:39:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564033162; bh=sC7LZzts/ecEg+5vOpALr6R0OhbdGwkmWRFNOsoXAhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wby3m7A8iuCUfboKlEKlo6wDENu5EANwoN32tD6/drKBsOSOlvYcvqe22DkasE5AD YLxB7Tm8pdPX7xqFqiDrfkm+wH2WkC91GOHCsq6iAo0J8G8RzO8zmm3Q7gnf+1akD+ 2A4hUAjwZ1E//g5PdM0dmDAxH+qBoEOh6EF3kRs4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kyle Meyer , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 4.19 112/271] perf tools: Increase MAX_NR_CPUS and MAX_CACHES Date: Wed, 24 Jul 2019 21:19:41 +0200 Message-Id: <20190724191704.820359242@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 9f94c7f947e919c343b30f080285af53d0fa9902 ] Attempting to profile 1024 or more CPUs with perf causes two errors: perf record -a [ perf record: Woken up X times to write data ] way too many cpu caches.. [ perf record: Captured and wrote X MB perf.data (X samples) ] perf report -C 1024 Error: failed to set cpu bitmap Requested CPU 1024 too large. Consider raising MAX_NR_CPUS Increasing MAX_NR_CPUS from 1024 to 2048 and redefining MAX_CACHES as MAX_NR_CPUS * 4 returns normal functionality to perf: perf record -a [ perf record: Woken up X times to write data ] [ perf record: Captured and wrote X MB perf.data (X samples) ] perf report -C 1024 ... Signed-off-by: Kyle Meyer Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20190620193630.154025-1-meyerk@stormcage.eag.rdlabs.hpecorp.net Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/perf.h | 2 +- tools/perf/util/header.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/perf.h b/tools/perf/perf.h index 21bf7f5a3cf5..19d435a9623b 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -26,7 +26,7 @@ static inline unsigned long long rdclock(void) } #ifndef MAX_NR_CPUS -#define MAX_NR_CPUS 1024 +#define MAX_NR_CPUS 2048 #endif extern const char *input_name; diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index b9a82598e2ac..7f2e3b1c746c 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1173,7 +1173,7 @@ static int build_caches(struct cpu_cache_level caches[], u32 size, u32 *cntp) return 0; } -#define MAX_CACHES 2000 +#define MAX_CACHES (MAX_NR_CPUS * 4) static int write_cache(struct feat_fd *ff, struct perf_evlist *evlist __maybe_unused) -- 2.20.1