Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10377112ybi; Wed, 24 Jul 2019 22:04:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqypUBr6vcZazI4fXS3PuaelR/5I4b5ZbMs4OPUDdzbZPaC8oLMimx5oyxrdF7UhO0oZgw5i X-Received: by 2002:a62:3445:: with SMTP id b66mr14839376pfa.246.1564031086017; Wed, 24 Jul 2019 22:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564031086; cv=none; d=google.com; s=arc-20160816; b=RhZbFL8dB9dbCOoBfhpvtA6uOKk3H16qGvPWMS7/qYeMegkXoy2CKQCZyvcxPDPZp9 b3cxJmEkxJSHuOmCsK/S2dmlq4PgSQBdigTaPCZlCYHb0F30Bie2F1StnPfwqJljTnnJ 9Mlkc6OBptu0IYjAYcVBqzYu5JoqhdBAAAbHNbuoSxX3aZ8348DdmZye5JbtFu9HDxPc ag2Jsx2FcRw0NxGkZkGL9QSBZGy/vvkW/BGSz8eRb26+CrIJGeAv588XWnRAMnCxNwGH SY+h/fDnngOGSWIjE4hFh17yF9B1csBCL1EvZfya0xMLkrw9xzhEQ5gY2/33yUSX9eFK lmKQ== 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=skJm5pVGFsokdn72RVosUvXiAf5LuSA1+RxtmJlaEGk=; b=JNPv0Gipq293Ka+ERYg/f0o4db2BMx77im96a+F8l+k47QVKwTIzgQcjBfvEzZLq0e +1Hps/3VpZvu3xUQy6KAKl0KhItGGB5Syz7+SkX2rOiX17civMRCeLcR5DhxnUIC/NV+ g5lk1jW4BLRmzZPmjEX1Kblgj+kmpKci7TJN60cX82zqgbl8TfwL9uXNa/Tk6Oe26z5v GqVaMqDqGc2zMZOXtDQnvXfj6pfmQ1sr8K8vkHDP05QUvlend8MsTUn/RgFg1ewYe+tx aeqlaF75GiI2MQBTUX2Lnc5jFGsHsg0xNlyss0mVZmnU66b3dJW4yIjq79GiOc5e8fcg 73EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=d9qk39OM; 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 a89si17420076pla.60.2019.07.24.22.04.31; Wed, 24 Jul 2019 22:04:45 -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=d9qk39OM; 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 S1729149AbfGXTuN (ORCPT + 99 others); Wed, 24 Jul 2019 15:50:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:58638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728840AbfGXTuH (ORCPT ); Wed, 24 Jul 2019 15:50:07 -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 C61FA20659; Wed, 24 Jul 2019 19:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563997806; bh=2k7GC3BXcoINbX7M/tcqKNlBxhtLxVmgdf3pukCoyZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d9qk39OM9P3gstxUyD47qOa3jteWgronh2kAc8ysGXPXRosi9pAn+ZViMtbfrKZXo PpfBFRA8n8zE/QnEmOxU8IUZvlNvymXZjaMaDNtPx2GNYdAunYm2tvj3oUm+fohwzn Kw0WwJRLeM3dkt7mbJeXwAo7Y8SnpF0FTzMUJ1Z8= 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.1 149/371] perf tools: Increase MAX_NR_CPUS and MAX_CACHES Date: Wed, 24 Jul 2019 21:18:21 +0200 Message-Id: <20190724191736.377022216@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191724.382593077@linuxfoundation.org> References: <20190724191724.382593077@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 c59743def8d3..b86ecc7afdd7 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 682e3d524d3c..df608cfaa03c 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