Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3487142rdb; Sun, 10 Dec 2023 07:38:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhWUjMAh9DNbh/N/fIPJ0JQekdVteZY63Ywx+5sLUl0vwvT7jWyL8avymCdHo9bDc4NCLh X-Received: by 2002:a17:90a:7047:b0:286:6cc1:3f1f with SMTP id f65-20020a17090a704700b002866cc13f1fmr2201210pjk.86.1702222697902; Sun, 10 Dec 2023 07:38:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702222697; cv=none; d=google.com; s=arc-20160816; b=v2txzFAkkEVfgpOe95PnxBrQR81Ew2ukf3bUFLMib5KwQlGKH/Bu6GrD9WTKykytbY aJ9UvXEkC1XqSx10v9EWV43zviBlimEupUDdxbjcapdOSHwaePbfmh0bTVZ8xvFVACRk BATMrfa3hP0ORQkuajyoDG/fLhIPSuiViMPjkNg1JenuD9gxy06UVpNe+GZ7qeNXEO/x CO9kcpmOybMQr+/mgjD9oC/En+cdfKwKPXWDQmVfcgIz7YRF1Dxdp4FTgI5fUL4QRFAn bgZ8LhRak4WCfDFpkrI5d7GiL8PSDjhU78foILqwq8/xMlU0C0q//DGJqvP0elBx2V7r UJEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=1GMlM6348pGKFB6b1XWawKXIlq1pyGHwdvOuZioEPlY=; fh=9+Bd3wNdulkJDnwv6TArQTADUHjLW4dvysLNh2CrCkw=; b=ASV8tixFzyr/CrqMBS+IhS9WarnZyY86lDS92VGFqv77DNahE3omvTRiwnznTLXhCk RzA+8LiRvTQNBSQZUnhyv9DLop7g4UpAdm2bSDIbZJHUb6Pk5cpgSJQUntqBBzgbabRf qbSTk80n9GU6Hqt2b6q4FHty4y84tb5LiA8J/EAWmAsDKxLAtpM6K7WuowMmfhmyn5qo EsVcIvj221Yb3Pd+Xl4G2xpzoT7ncWu3lvXqyy1ndes7T6Y+DkgjmyNDwkIvJ55xsWx/ HoIVfD6AmH3o/zl973KIxxrIvNNOn5PNeWLq4nYAgBzykp9rpOe+HLSZ2eAOr5P5KJ+x Cc0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id g16-20020a17090ace9000b00286550aeb78si5872277pju.102.2023.12.10.07.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 07:38:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A34278070DA0; Sun, 10 Dec 2023 07:38:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbjLJPiD (ORCPT + 99 others); Sun, 10 Dec 2023 10:38:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232270AbjLJPiC (ORCPT ); Sun, 10 Dec 2023 10:38:02 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB25DF4 for ; Sun, 10 Dec 2023 07:38:08 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F6CAC433C7; Sun, 10 Dec 2023 15:38:07 +0000 (UTC) Date: Sun, 10 Dec 2023 10:38:44 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Andrew Morton , Tzvetomir Stoyanov , Vincent Donnefort , Kent Overstreet Subject: Re: [PATCH 00/14] ring-buffer/tracing: Allow ring buffer to have bigger sub buffers Message-ID: <20231210103844.7cabaa13@gandalf.local.home> In-Reply-To: <76797ddd-bb87-4af9-9703-1ec00a0d318c@efficios.com> References: <20231210035404.053677508@goodmis.org> <76797ddd-bb87-4af9-9703-1ec00a0d318c@efficios.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 10 Dec 2023 07:38:15 -0800 (PST) On Sun, 10 Dec 2023 09:17:44 -0500 Mathieu Desnoyers wrote: > On 2023-12-09 22:54, Steven Rostedt wrote: > [...] > > > > Basically, events to the tracing subsystem are limited to just under a > > PAGE_SIZE, as the ring buffer is split into "sub buffers" of one page > > size, and an event can not be bigger than a sub buffer. This allows users > > to change the size of a sub buffer by the order: > > > > echo 3 > /sys/kernel/tracing/buffer_subbuf_order > > > > Will make each sub buffer a size of 8 pages, allowing events to be almost > > as big as 8 pages in size (sub buffers do have meta data on them as > > well, keeping an event from reaching the same size as a sub buffer). > > Specifying the "order" of subbuffer size as a power of two of > number of pages is a poor UX choice for a user-facing ABI. > > I would recommend allowing the user to specify the size in bytes, and > internally bump to size to the next power of 2, with a minimum of > PAGE_SIZE. Thanks. I actually agree with you and thought about doing just that, but decided to not make those changes and send out these patches with the given API first. I wanted to see if you would comment on this ;-) You did not disappoint! I was thinking of keeping the same kind of interface as we have with the buffer size "buffer_size_kb", and have it be "buffer_subbuf_size_kb", where you specify the minimum size in kilobytes and it creates it, and the subbuf may end up being bigger than specified (as that's more a implementation detail). Now that you called it out, I will add a patch to convert that as such. But will keep the current patches in for historical reasons. -- Steve