Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9984721ybi; Wed, 24 Jul 2019 13:33:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzps0rgNWPr58xMFgcYHyIn0jtfKavUfLEqOwJTKG9Z0Hgw262ViHdKWph5d/x9370Vn/lG X-Received: by 2002:a62:fb15:: with SMTP id x21mr4906699pfm.233.1564000393282; Wed, 24 Jul 2019 13:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564000393; cv=none; d=google.com; s=arc-20160816; b=Y2u/42YtbAVfg5E4z7ua+kl1eG0Ch9y7fhYtF8B8aIvoweieF+W8pn/Dlw6bdhQPq6 dpQp2ot0RJ+YiXduyOusA4o+/twSTZ/ZZ2tT6vFQURHp2PsGPeN5fR+ywHNLk3rhew7O Mqrn7oimaqUQtCJgHV0zB79rZvSFPcPXIJmClfx28dZzHsQR6MLhBeKsenlUaGLwaprR YvGk97mM4/4YdwAU7Wyv0ThBoK2uBkz1vHf96AyNB/a5e72bUL8eO8T0kEPoIAvOzBRq eSphzt2bz1oJ2+E8XVPAhiCn/2uBn44EMa8feELfWRwMb+6srK6JiKvmWussQGHSPOdz XhaQ== 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=o1QDOV1hJrF7yqT4W2/zzJ5X/5JdN9J/tove2GspdLI=; b=s8mZsYAUMc8qxt/IOd0KNts9zE6fpNt9TxYWKrWnBLtknaCnJ2F4Sd5zskeBuNykRV kbpzcpbNiJXq7GE+wLmEHmirpGSMRxgulnKF1JSau8LcBLR2z40XppWcFTiI8IH0zhwX eEGheQO8m08+4gaDDmDMM4s6FcBcAARyUkqvGxYDi7aNNlboaZI35I7dm2ag66QX6hyw F8aoaLiJL/u1fn4UBd+OQr+3bFIJ63xXx1SpmSZmv4yaRMGkxIlFDMA+arq7yfBx4KjZ LAgSL0+O6X1mPNp6mvhf0tDcVsd64gjtTycM1CKds/Xrl++H6YYT3uNrDIh7ABZA5RMc VERA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=mUSRIM09; 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 33si14260431pli.144.2019.07.24.13.32.58; Wed, 24 Jul 2019 13:33:13 -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=mUSRIM09; 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 S1728274AbfGXTbB (ORCPT + 99 others); Wed, 24 Jul 2019 15:31:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:51360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388433AbfGXTa4 (ORCPT ); Wed, 24 Jul 2019 15:30:56 -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 B856C21951; Wed, 24 Jul 2019 19:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996655; bh=3rri1YZONZ3TOLxUQI7fXal6vOj9b7arHk6JSs0kj/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mUSRIM09mi4A2M1vacUlZM6IKBLsVX8HMWAnz84kV0imMAwaGE8n8oWGBOxq88Wdd zyvfQZGj5MmzWRir2nML3vr+XVsmw6ZNzoJpLBIEOH+grGse/ye4kS9EaEk1xk3s79 nfe8j8O3gCuRT9D5rHIRVC3JSc+s+oWzfbxC0ZkM= 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 5.2 164/413] perf tools: Increase MAX_NR_CPUS and MAX_CACHES Date: Wed, 24 Jul 2019 21:17:35 +0200 Message-Id: <20190724191746.787421443@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@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 d59dee61b64d..a26555baf692 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 fb0aa661644b..b82d4577d969 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1100,7 +1100,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