Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3454938rdb; Sun, 10 Dec 2023 06:29:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEht5NwcRoh4kHtwBHHUYUzOR3FJ0GyDaoU6HYXz8fuKCTLFdcmrhLkIDGIJvc0cJfWPyHc X-Received: by 2002:a05:6e02:1b87:b0:35d:66d9:479b with SMTP id h7-20020a056e021b8700b0035d66d9479bmr6066949ili.24.1702218553794; Sun, 10 Dec 2023 06:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702218553; cv=none; d=google.com; s=arc-20160816; b=j0WoF0xRCBax2v0/mXgImC2PzvIgfqMlIJkECQ13fU6IN63cyVUCs/a+K3x71NvpMW Lx1E2a4VPRmgr/YqWfOJG0ODomdAeKWENlduUslj4XGK6wf0VBDLHQM/kvYXNJ+g0qv1 VtI34BszCPh/HaMJ8kBEFa/GM7/HMNb3i0dSstM5wmUaSGPraxg5PBSLtvJAGrYleNBB ZJ4Dw5673N+M6ykFob4SWlIZAwQBmORbAr1NDiQ9U46wQRE4JQL+yA5nzuPUoEXADfjs aPec8NX5W9Ere8Kn+B7psBLBiSXdVl7prWnb85sz5rLVXpdZ9yT98bfEpokVKhKUXqB4 92hA== 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=KeB1YMH2GWBAoiXOYMOKIYEaewKHpuNb9WJ8LZaquM4=; fh=G/83VMsBzPXtrXGuk7n0vXkofgvgkBoDltxOyxsJJzo=; b=R8zCDW9gJfu8kMNEu1Tt/QD0+zlAa0sUnLHO81RPLjCdhE/MD9/JCXOfd1Ocr8v6QE gEQfCtxn6DwCcx7uwKPX2+7W88gk4caFu1ogP78CZYYhFP4G36/LvEyOmUMsRUZfLXv4 qaR6wh04QZzpiYs9FXOoKcmthUSQJWty3/PxZM8jsiu4v9nR0XQn+g094XYn+rkbL16D JA6MKQhlbXMNTUqkpFWj+tT1ICRhcEDQxf4XtbzMG0jz3QiGRkuoWWsnvGc0Sqf8x297 H09Q5I4yKKlnrb2Lw+gQQwcSfafEev0PQeEZZmVaDPOtHTXGipDLL1qzvic7TEXFbYIK iyOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=js6U22hl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id l5-20020a656805000000b005c66072691asi4550101pgt.551.2023.12.10.06.29.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 06:29:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=js6U22hl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 4BEE48074E23; Sun, 10 Dec 2023 06:29:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbjLJO25 (ORCPT + 99 others); Sun, 10 Dec 2023 09:28:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjLJO24 (ORCPT ); Sun, 10 Dec 2023 09:28:56 -0500 Received: from smtpout.efficios.com (unknown [IPv6:2607:5300:203:b2ee::31e5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2287C2; Sun, 10 Dec 2023 06:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1702218540; bh=x6MLErZNlQVGUs1Jib1nzGnOdZ6XoYrxaz8AY77jVF4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=js6U22hl+M3GPqo+VRXiaSJh2mk1f/k4aYZCMM4EYLHQm2ZnxFNisYENir+ZWrVHt 58cnjxndyo0eOxwGKagZTnHnNgy+n+/LdDHvxy2zNsMHi6+FWAPG7ksxYeuhGLI+dr OGUHovL9iGWmmMWptfqh6b7GA0+kqV5YbU2e9dbCday611eFc/Ah3VEMX/GxwrSqZ5 mhwUyMY63Rus8wpMYYwdXf4dQdDKxJqLchaJAHctjyYMrk0/hz6+BrZubaO06mk4RD fKMmRsLGtFNWmSN0hnc9bkum/K0Bs8Z5MwCPbAYBvVSRhRE+5ch49/BAWHDbCESGMF OePxD+2GcLl3Q== 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 4Sp6gw6CKDzFbv; Sun, 10 Dec 2023 09:29:00 -0500 (EST) Message-ID: <298be08b-b010-47e8-b6d5-78910b63a6a7@efficios.com> Date: Sun, 10 Dec 2023 09:28:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 13/14] ring-buffer: Add documentation on the buffer_subbuf_order file 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> <20231210040451.982725347@goodmis.org> From: Mathieu Desnoyers In-Reply-To: <20231210040451.982725347@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 morse.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 (morse.vger.email [0.0.0.0]); Sun, 10 Dec 2023 06:29:11 -0800 (PST) On 2023-12-09 22:54, Steven Rostedt wrote: [...] > + buffer_subbuf_order: > + > + This sets or displays the sub buffer page size order. The ring buffer > + is broken up into several same size "sub buffers". An event can not be > + bigger than the size of the sub buffer. Normally, the sub buffer is > + the size of the architecture's page (4K on x86). The sub buffer also > + contains meta data at the start which also limits the size of an event. > + That means when the sub buffer is a page size, no event can be larger > + than the page size minus the sub buffer meta data. The fact that the user ABI documentation for this tracer parameter needs to dig into details about architecture page size is a good indicator that this ABI is not at the abstraction level it should be (pages vs bytes). Thanks, Mathieu > + > + The buffer_subbuf_order allows the user to change the size of the sub > + buffer. As the sub buffer is a set of pages by the power of 2, thus > + the sub buffer total size is defined by the order: > + > + order size > + ---- ---- > + 0 PAGE_SIZE > + 1 PAGE_SIZE * 2 > + 2 PAGE_SIZE * 4 > + 3 PAGE_SIZE * 8 > + > + Changing the order will change the sub buffer size allowing for events > + to be larger than the page size. > + > + Note: When changing the order, tracing is stopped and any data in the > + ring buffer and the snapshot buffer will be discarded. > + > free_buffer: > > If a process is performing tracing, and the ring buffer should be -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com