Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1680277pxb; Thu, 7 Oct 2021 12:44:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBqFobdHtWiXtAV+WVaXy7wjF4pVmdy2S6ZfVOSAPqIACz4UB0uLV2TIwSA8sbD5Vw2irv X-Received: by 2002:a17:90b:3ecc:: with SMTP id rm12mr6964560pjb.48.1633635855682; Thu, 07 Oct 2021 12:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633635855; cv=none; d=google.com; s=arc-20160816; b=hzwooyOgXAPWmkvsDMnx9IZSUyrpitAXXz0l3by3OtxwYqUsH8njCUCLI1bTlbX81Z fcQFZ0CgG47sbgsgmJ27zNOG0poP33wj1b4E7HJsaeCR9lbWfdiT+HssgxCs/UJT8VEA 6aDnqndyLdYCMhqUnk3gkmJrgNpElbWrcnEV0/SOMjzsP6xK3R3sVKKvf05KsoosQkLy sX+jjFy/3fg/b8OoFe7okj+gceZqrpe7KyDlD4ht7Vl0VtKYJZo/fIUFxNxyDrAMDHUk I/Nx2dC7lP1j7b8L2dL24uENS8rkjlD+3VOzFXMIX2ZVaVtRDqIHGycjB0R1WED6QkE6 ymLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=yeJqcdyV97jPLXTWnFarmAA3TSmhkPGl0CFXjxSnxWc=; b=aIHk5Pc0TIa9zakCw/gXUkORPZ1hN7iAbQPkbmQn3oDB3GJnXqPJPiIb8ZTK9wtvET So3iYPehbqSasHL6Vn74qRX7JSQ/WfqXyQnX+FxNRdjgRm75B8R1L8jOAzwKhmDjh7nI mT8kdpWHu2n4WTBJOUDaNijLuKmsApF8KzxaOy1ku2PWn2oHfYgYLPQvNOzXlnFhM64/ K25GYGsaUod9rzNpjTNyRUhPhcHosNGNbAGne1J65wZ/xakQCMpgPGKfaiAL8mJrWAdE OrkXqUeZ55jTwSaGJVr0UHuiZzSpAzza/j26vXvYHxlzg1Dxqcp2lCpMaTIaAGPbNLEY smdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y2si332194plh.329.2021.10.07.12.44.02; Thu, 07 Oct 2021 12:44:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241873AbhJGR2D (ORCPT + 99 others); Thu, 7 Oct 2021 13:28:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241849AbhJGR2D (ORCPT ); Thu, 7 Oct 2021 13:28:03 -0400 X-Greylist: delayed 67051 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 07 Oct 2021 10:26:09 PDT Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAEDC061570 for ; Thu, 7 Oct 2021 10:26:09 -0700 (PDT) Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B8DB342A9A for ; Thu, 7 Oct 2021 17:26:05 +0000 (UTC) Received: (qmail 11475 invoked by uid 10000); 7 Oct 2021 17:26:04 -0000 Date: Thu, 7 Oct 2021 17:26:04 +0000 From: "Robin H. Johnson" To: Steven Rostedt Cc: Peter Zijlstra , "Robin H. Johnson" , linux-kernel@vger.kernel.org, mingo@redhat.com, rjohnson@digitalocean.com, Arnaldo Carvalho de Melo Subject: Re: [PATCH 1/2] tracing: show size of requested buffer Message-ID: References: <20210831043723.13481-1-robbat2@gentoo.org> <20210907212426.73ed81d1@rorschach.local.home> <20211007071151.GL174703@worktop.programming.kicks-ass.net> <20211007092358.65152792@gandalf.local.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="x8iEuWIzMNV+pbH2" Content-Disposition: inline In-Reply-To: <20211007092358.65152792@gandalf.local.home> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --x8iEuWIzMNV+pbH2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 07, 2021 at 09:23:58AM -0400, Steven Rostedt wrote: > On Thu, 7 Oct 2021 09:11:51 +0200 > Peter Zijlstra wrote: >=20 > > > > +++ b/kernel/trace/trace_event_perf.c > > > > @@ -400,7 +400,8 @@ void *perf_trace_buf_alloc(int size, struct pt_= regs **regs, int *rctxp) > > > > BUILD_BUG_ON(PERF_MAX_TRACE_SIZE % sizeof(unsigned long)); > > > > =20 > > > > if (WARN_ONCE(size > PERF_MAX_TRACE_SIZE, > > > > - "perf buffer not large enough")) > > > > + "perf buffer not large enough, wanted %d, have %d", > > > > + size, PERF_MAX_TRACE_SIZE)) =20 > >=20 > > Priting a constant seems daft.. why is any of this important in any way? >=20 > I see your point, but it can be useful if you changed it, and want to know > if you are running the kernel with the change or not. >=20 > I've done daft things were I changed a const and was running a kernel > without the change and couldn't understand why it wasn't working ;-) Yes, my initial internal versions of this series only bumped the constant, and then I was running a few different kernels, and being able to compare which value was in use became a problem. I was trying to think further what would make sense for the constant. - What are the negative impacts of a too-large value? - Is there demand for more reconfigurability?=20 - Should PERF_MAX_TRACE_SIZE be a knob in Kconfig? --=20 Robin Hugh Johnson Gentoo Linux: Dev, Infra Lead, Foundation Treasurer E-Mail : robbat2@gentoo.org GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136 --x8iEuWIzMNV+pbH2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Robbat2 @ Orbis-Terrarum Networks - The text below is a digital signature. If it doesn't make any sense to you, ignore it. iQKTBAABCgB9FiEEveu2pS8Vb98xaNkRGTlfI8WIJsQFAmFfLatfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEJE RUJCNkE1MkYxNTZGREYzMTY4RDkxMTE5Mzk1RjIzQzU4ODI2QzQACgkQGTlfI8WI JsSADQ/7BIT543vVll06kQgmdZnFMztBrT2IoNv7YUMD/xGoqKaWDOdhsqN1E2IT 8Q2qwPB/E+Gi5/awV58qd00Xt5JNkIOYvI0rJJVTxyWQJjywpIHISYRtdSwQ7mEX WGBB4Y8W8EQTXhijERO8zcqJ6jz3ERTdLDUN3bo07Vxw93IEQBR1OynhZMz3NB+4 jqp0DjlyCisJQ2MuyMJpP79PZlGWosT6Y6SVOXXQ1uTjWTiX2BedJsGElOUFvehX 7uMkZj0Ol/ZaSB3WyQn7+PriW8Lt2nIgjdfb3Xvtj0UXia+EHSzNqYcNHRe0jjOa 4VyGjYJQ4AT/1Sud4nKs/ivYhsnBEDrAMN3pPqWq0KXilCC4EGGzgfsTUSxUb7HG jx6TT1XQz/D+Ei4aY5AjaMrJh74ekEtlCDC/VoZjjYYTOTmR9WChIWe+jl5SB/YZ JoKvqhFXvzW9/xBatpduuKtZLtAHAGhUp6OjRITsrj+SL7HdljGLqueYhmD+KeGd k+uwtiyxfjFH/x2hTEnZ9lnzaDnDdz1lmhMHb2aDV07PC5N4UKqY1v/ayMYfkJtx XFyiEhzSV1jDaCxbTrV1jFNhdruPgYReup1IBA+IGfma44dykRwujJAjvdzJkXpl NP3YTNyEcibrBEuV4RwPW/2XeuxVGhKi0hlnLjXiGJnioiN6990= =NL8u -----END PGP SIGNATURE----- --x8iEuWIzMNV+pbH2--