Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3450196rdb; Sun, 10 Dec 2023 06:17:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+oXHHE/E3DIPf0wO1wAdOVt3JBr+hSIAG7pKsLtXrNeGYuqeVO4u0TxoZaI4uQvxGpz/Q X-Received: by 2002:a05:6a20:12cc:b0:18f:cbdd:8102 with SMTP id v12-20020a056a2012cc00b0018fcbdd8102mr3794431pzg.103.1702217877461; Sun, 10 Dec 2023 06:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702217877; cv=none; d=google.com; s=arc-20160816; b=dPnU+fK6vDXxKghg9IBl5rxWpYajayK/+V+Xn6PjTOV8gcyfd6klVJIXNXg2IYWxi3 ZQsT2gWHvzeP4MFxa/Cukcww+d6qmkzz/MzlkLmRSIbiZNRft5X7L9PNl2F9pvx1oeMy JqXO+mguI01CPUcIfjZAHCcmDooDVdC7JV8nsPvRZYWjqNbX/Q0S2FhKK4b3XjB1Z3uv u6yWOpRSwN6VhxTHPqDB/XE7ptJt7qr+MZLxBW3X5t7fdLBYwO0u94anAIK5gWcpKklN LadKJqnF4BIg4bWjmHDfF3wDqvs5pY8idrxPntJqJQpLowBGuWAKYk+59T/6LGwU4Ns8 UGRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Lagnu8BebGvnJumGXvimDy06bhv2SdIBjkLEwERQPBE=; fh=G/83VMsBzPXtrXGuk7n0vXkofgvgkBoDltxOyxsJJzo=; b=KYpTMmxFzqxrgw/3RkVKRP3bKsAaJa1D9UTKadPuw4PvbcHe6p6+62QK6fjzlVEcJ7 nQyj8tLUpp19XFAm3OPg+n6hd2w/WofVhhhnUKX/4HDl6/c3qAye/6CXsK5WWV6UdNjS ogEKNO0YYM++YNU9uCfIVuZub9mmlxWAmFxXv9MkQ1Mlo1iv7mtHjcARdy18uPsvlK/Z +PIyr4tn737XzqxLbhehR9l2450ehW8UaH1BpkAvD3RFFmIDAzgou5rnqtS0Z538SVBF EQ0j9KrLM/bNmXKTJsBwFRtRi5SJx3Eh6THOmi02frPJ1Ndzgnb+J0FzthWf3F6Qu98r Q+cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=SmGi6NmM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l8-20020a6542c8000000b00578a44df6c1si4548590pgp.640.2023.12.10.06.17.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 06:17:57 -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; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=SmGi6NmM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D8FE48070721; Sun, 10 Dec 2023 06:17:54 -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 S232271AbjLJORk (ORCPT + 99 others); Sun, 10 Dec 2023 09:17:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjLJORj (ORCPT ); Sun, 10 Dec 2023 09:17:39 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9209F4; Sun, 10 Dec 2023 06:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1702217865; bh=95FOqqEVlvMpVu60xKcTVHAxKd+ad692k9vCay/7OIc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SmGi6NmMr8M8UM9SD93vDg7+H16lkzxZdbVZdUOSatOmwq0RRnP7D8ItJLGmLth6g MuRFqYbO0B82vEExpJ8fjRpe/ahu15CUQfWpiZotn1/7fDIuMY0J+76xyM45/VOx/r VcD9qhLu1WR9H1yb89kYapLAQ5zXCgpevNlfFXL5t8A3wIiNvIhY1tcc96gPnH4Eoi TBKnN5iSi1etbYHoDHF3WQdCCFW9lvHbjvH6CfxrZbBWQfDlxb6pLDucIV1bTM8dKm 617ArDJcUam1f3728aghyIvZQkMVkT+qGlKP96QLDbr6le4gJ5gPgZmXld0Pjxfqah WShryYQuXOS7g== Received: from [IPV6:2606:6d00:100:4000:cacb:9855:de1f:ded2] (unknown [IPv6:2606:6d00:100:4000:cacb:9855:de1f:ded2]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4Sp6Qw6jlVzFr3; Sun, 10 Dec 2023 09:17:44 -0500 (EST) Message-ID: <76797ddd-bb87-4af9-9703-1ec00a0d318c@efficios.com> Date: Sun, 10 Dec 2023 09:17:44 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 00/14] ring-buffer/tracing: Allow ring buffer to have bigger sub buffers Content-Language: en-US To: Steven Rostedt , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton , Tzvetomir Stoyanov , Vincent Donnefort , Kent Overstreet References: <20231210035404.053677508@goodmis.org> From: Mathieu Desnoyers In-Reply-To: <20231210035404.053677508@goodmis.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 06:17:55 -0800 (PST) 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, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com