Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3784856ybi; Mon, 29 Jul 2019 12:34:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrueHmQ/yDT9EuA4/qlurE1OuEWqp6QAyXlg7LXXdClJoNHB+aBRVduMlTIvXBDivpwSw/ X-Received: by 2002:a17:90b:94:: with SMTP id bb20mr115409574pjb.16.1564428851826; Mon, 29 Jul 2019 12:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428851; cv=none; d=google.com; s=arc-20160816; b=zU7zKlKwlC4vGednlO6RKJsB3aXqdGV9d8ImwgGuINozr3usiwSJBw28NrlvUpRFWd FNBPqvitL85na3B0/OUqHtg/eNY7GhnlBC6JeRPieFXb8wuXcaLVO50qeiLRSGNnusd/ ws3CqrkZrh3/v/+8Q845BZ3O1qOhR0ZXrX1rjkBEUgv3pL8L0nIuCdirWWDnn3ZU4Fei SCLQUBxHeTx9JDIEfkJzLZ5lrhVM/P2GZA2ier/qvz5kxf74I2Jc4YRmrCOwZocedArY 9fsIr0hOkaz9BHwJX2U5Geyyx6FLDiKmm9+uwhOCdXWrWeB3Me6EBjnKPiXOR6BTXqwF C8DA== 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=3GJS0JcfQD+R347AH2tMlI36xssrS/hX/8dh/3Py+I4=; b=mlbgd5IT1WLut4O9pJmtFbDpqwUh4ap5hc7ds/5JAUDx+MCEWyiITgMpa/5Ivi29F8 fkHzJF21Cgb6H+b5PhibuVhL3xg9MhNDgI2q6JeU9Q+jxQ48oWpxf3zmI3+M96PIVNXc GRN7pWUnJNKuoUd1KVezzWrvflxF96aTDWZ30hlLZgdtQmk1/Jo5hSNhDN3jsmN0zV/k PKKRRpB3D9WvYLLcoo4h2wOqDtwiPEfvW33ZjanictJyALZuL5b6yB9e1oDp219iDlqY WJAeYuEaJNNJrKbxWI8SrxTsUMH1R0Choe6niN20B1Ey9SR9Url2t4UayJirSIGCvO73 9YpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CF9YD4eU; 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 f1si27998695pgc.144.2019.07.29.12.33.57; Mon, 29 Jul 2019 12:34: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=CF9YD4eU; 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 S1729917AbfG2T1b (ORCPT + 99 others); Mon, 29 Jul 2019 15:27:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:40102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728994AbfG2T12 (ORCPT ); Mon, 29 Jul 2019 15:27:28 -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 EA4A52070B; Mon, 29 Jul 2019 19:27:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428447; bh=GYw9Cov781phGaWT9Snw8uozHLMNnxrt/GbHn2PmxZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CF9YD4eUaQ5BcSOWz3His8wXU52d7Cc5OGhnSAXJ6mem7m9tL+sYxJhWnvtYbePOz GCv+RaOmf1RSkWJj2eKVUZN3nmKfRtW8BrxR9iqIwjC8vGNltTji7YCIdXtFhFQszn cuNeQObGidj40QcMMP+dJFZrNHHg/CYhhAZrz+WQ= 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.14 079/293] perf tools: Increase MAX_NR_CPUS and MAX_CACHES Date: Mon, 29 Jul 2019 21:19:30 +0200 Message-Id: <20190729190830.667960254@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 96f62dd7e3ed..d4ebd0956114 100644 --- a/tools/perf/perf.h +++ b/tools/perf/perf.h @@ -25,7 +25,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 f11cead6a151..26437143c940 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -1122,7 +1122,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