From patchwork Fri Dec 29 17:24:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 183926 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp2700413dyb; Fri, 29 Dec 2023 09:23:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrFnNxvevUwi4RNsqRM+p3/sG+JVaSgVWwDjpa2S3xirUnCBoQF5gOoTEGP10LXQmVHCYR X-Received: by 2002:a05:6358:281e:b0:172:b539:3fcd with SMTP id k30-20020a056358281e00b00172b5393fcdmr14626699rwb.53.1703870607800; Fri, 29 Dec 2023 09:23:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703870607; cv=none; d=google.com; s=arc-20160816; b=KJQbzU4EOAWc6F5vjYOyJXmGHu1lxTMJzgZusb/FQLOAdMzbV/i+KBMHNZCimEVS5l 3zgGYh+Jsa6rsOCkK+8mwBb1ihAO1qk7yAT5j44l6GGWQcragMSVL/PyuIFRqTEKv7aj BmXXvGdDbWMXvq3Z1xbX8SNojNh1U5rhJeSjpWtBfs3aUbV4bLohC6pndicOuldzgDmL 6pOuCKisVI09b+rGFQrC0CmMJsRM0mPgSvMtcH4bX0LpmD8WsflrdrkLpxDWsw26kol9 UMrml/EM0YC7PTbA/8UwwQu0JEBH7Xqsx0Yy4W+93ohq+d6wlrMAjE1ZaDGBtTGPZYOQ xLlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date; bh=o3WJXVBQP+kTw3zY62jgy3MZMhhUtVLTxyNkKX72aSw=; fh=IZ4pMW6yq4D0YByluEzlj+UIZVS2MlWE0jEBbJOxfoM=; b=tqd3VuW1GrolscPpszFTXbJ0Kgfvu6r4mVZSjw2a92I4nxM7IJ/P1eaUR9nienLHGx SSf9BlBKqoWzoQPIdo6nxZTbnd55M/YeU5aEIoEj0BbqDyrp9CLjKKrGzOPJsjSscN2c Lc8dHHQ/MFnY0r5QpXRwr1o7ObbG+P1XdaI8tx1kVfLxI/B94SH02UsU+9eONXspFb3O W6YFuZj8zPNaNApmQQJd+mLCkqf5syt3TZLNLa5IwxCSeoYoF1888Ye1+Ej3Nfw8a6Up AlBQJIfK2p0lxidxoA+TSrs2zm1njUYWmKXTxm8LkTAO/nqupIpwHYPZwHfqbBW9i2q+ JQzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-13181-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13181-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id ml15-20020a17090b360f00b0028cb1281d0asi1284831pjb.134.2023.12.29.09.23.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 09:23:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13181-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-13181-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13181-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A31C283618 for ; Fri, 29 Dec 2023 17:23:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6B7B12B96; Fri, 29 Dec 2023 17:23:14 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38CFA12B6B; Fri, 29 Dec 2023 17:23:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3D0FC433C8; Fri, 29 Dec 2023 17:23:11 +0000 (UTC) Date: Fri, 29 Dec 2023 12:24:02 -0500 From: Steven Rostedt To: LKML , Linux Trace Kernel , linux-doc@vger.kernel.org, Jonathan Corbet Cc: Masami Hiramatsu , Mathieu Desnoyers , Randy Dunlap Subject: [PATCH v3] ring-buffer/Documentation: Add documentation on buffer_percent file Message-ID: <20231229122402.537eb252@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786637826104866915 X-GMAIL-MSGID: 1786637826104866915 From: "Steven Rostedt (Google)" When the buffer_percent file was added to the kernel, the documentation should have been updated to document what that file does. Acked-by: Masami Hiramatsu (Google) Fixes: 03329f9939781 ("tracing: Add tracefs file buffer_percentage") Signed-off-by: Steven Rostedt (Google) Acked-by: Randy Dunlap --- Changes since v2: https://lore.kernel.org/linux-trace-kernel/20231226130149.4685c838@gandalf.local.home - s/watermark/water-mark/ (Randy Dunlap) - Added '::' and indented the number list so that it has better formatting (kernel test robot) Documentation/trace/ftrace.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst index 933e7efb9f1b..917501a2f348 100644 --- a/Documentation/trace/ftrace.rst +++ b/Documentation/trace/ftrace.rst @@ -180,6 +180,21 @@ of ftrace. Here is a list of some of the key files: Only active when the file contains a number greater than 0. (in microseconds) + buffer_percent: + + This is the watermark for how much the ring buffer needs to be filled + before a waiter is woken up. That is, if an application calls a + blocking read syscall on one of the per_cpu trace_pipe_raw files, it + will block until the given amount of data specified by buffer_percent + is in the ring buffer before it wakes the reader up. This also + controls how the splice system calls are blocked on this file:: + + 0 - means to wake up as soon as there is any data in the ring buffer. + 50 - means to wake up when roughly half of the ring buffer sub-buffers + are full. + 100 - means to block until the ring buffer is totally full and is + about to start overwriting the older data. + buffer_size_kb: This sets or displays the number of kilobytes each CPU