Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp580033rdb; Tue, 23 Jan 2024 08:18:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHM9ZWtXilUKxa9KcXTGh8ySWY0397BTmwvoqFTFDjSIELRTrOEcSxXW4qCtucmer+DvsPv X-Received: by 2002:a17:90b:910:b0:28f:fc44:f61e with SMTP id bo16-20020a17090b091000b0028ffc44f61emr2866119pjb.60.1706026694338; Tue, 23 Jan 2024 08:18:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706026694; cv=pass; d=google.com; s=arc-20160816; b=SykrjTCTul1QzTXGltPvZAwiXJYM+NZQQqNFze0uheGXIprO+zl4Jegk9nWDYFTzag BXb83pcyDP1lvESif1NnGv2JKQZr4FYoREPzpS9xOUJ7PSqKiN39L57iF93MQ2zD/etG mHYrf/IuYvXB5M2BRBfZ1C8yaG8Im4IQBPRHNomhMkirsmU4ZsUWmV+v3ar4XPNQlx5C ZBXc74SgYOnpAWP1p4GLB23xzHK9GTUCZeO+U/Gt7z0JiYmmuNp739LMEQmCfEgo5PzD FY6wFi6c7i0jCRWNkXdF1UcBoxD9VdnFUBVHnovmYv590i4wUUgJUDugwP90qfYbof3j LVDg== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :subject:cc:to:from:date; bh=Jny4YDa9A6RFLaSwrfJ4ZBPbrESZ5WnASTPfLkQWq14=; fh=AdbslQO0k+AnvEfX3vMM2zR0Ci/sn0BMuAHQ8jbhQKE=; b=mr0DpgQMAbbAFXEr32oGyLa80vXbD/eWjt2jeqmI4vA48VIQoLpKjIWdsQqXd23bYB nmiVuM1LFhkrM18jZrQg+0z7B1K/EDj3byr/7tiWi/woxFvxSJ4GLpHS5+jNyr1XRtwG 2oVTeJ9OthkvP0yHgwbAHYkkm8VsIWofORBBNX01mnb0fQKhHKVYgUVL+VL05pzewPv0 dLaPYcKGJNBeb+JY3D7YaI/gu7nT5zoB+h01lF4OtM8FVzMM8/jjqa54kNmIZ19QTqED /L78Y2n5vbTDE/FALW0EcXe6OPd8Gy7KpThOJ85SdVh5rW4yrwBUXI12XQNvsK9iGkk5 fSqQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-35594-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35594-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 22-20020a17090a0a9600b0029062d618ffsi6443979pjw.172.2024.01.23.08.18.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 08:18:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35594-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-35594-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35594-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E82ECB2BDDE for ; Tue, 23 Jan 2024 15:53:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF218612DF; Tue, 23 Jan 2024 15:50:20 +0000 (UTC) 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 5753F604C4; Tue, 23 Jan 2024 15:50:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706025020; cv=none; b=Nfy4jnDcVnc3AOKtA/ntqC6jAFpmxmZAsPzp4YL2pcWVPW6OiXr1aGN3yMLdWrWw2KH5gJqcA3N5glB1f9yXJUSBu5ihTpkl6KFyBpCT8XYdJFAGc13RXCvJZWIzBRTlsG6WEoLs7IptXJR7OArwdB2lgIyUpSg3Tuo+krWwcZA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706025020; c=relaxed/simple; bh=tf/dpxgcUBtYs+oE2E1+O79b0TAiJ4Gu5UtW7Lg9Q1c=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nekuT9e416/FKgiqXuXBfpODImZflugnrQaAGBqw+lhbIh+Veq6NJ3MTDkeVvVrXwDgMOKxa9ZsXAJxo5SA/jw5TfBAV8Zxbwle6ttCpUmwbX5T5yYMzThaO/pXiJa3xnrZE3x1+s4H4AcYiUVO1btFiq0CrC34PKBSFv5geZUs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A6E7C433F1; Tue, 23 Jan 2024 15:50:19 +0000 (UTC) Date: Tue, 23 Jan 2024 10:51:49 -0500 From: Steven Rostedt To: Vincent Donnefort Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, kernel-team@android.com Subject: Re: [PATCH v12 2/6] ring-buffer: Introducing ring-buffer mapping functions Message-ID: <20240123105149.36abf019@gandalf.local.home> In-Reply-To: <20240123110757.3657908-3-vdonnefort@google.com> References: <20240123110757.3657908-1-vdonnefort@google.com> <20240123110757.3657908-3-vdonnefort@google.com> 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 23 Jan 2024 11:07:53 +0000 Vincent Donnefort wrote: > index 000000000000..5468afc94be7 > --- /dev/null > +++ b/include/uapi/linux/trace_mmap.h > @@ -0,0 +1,44 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +#ifndef _TRACE_MMAP_H_ > +#define _TRACE_MMAP_H_ > + > +#include > + > +/** > + * struct trace_buffer_meta - Ring-buffer Meta-page description > + * @meta_page_size: Size of this meta-page. > + * @meta_struct_len: Size of this structure. > + * @subbuf_size: Size of each subbuf, including the header. > + * @nr_subbufs: Number of subbfs in the ring-buffer. > + * @reader.lost_events: Number of events lost at the time of the reader swap. > + * @reader.id: subbuf ID of the current reader. From 0 to @nr_subbufs - 1 > + * @reader.read: Number of bytes read on the reader subbuf. > + * @entries: Number of entries in the ring-buffer. > + * @overrun: Number of entries lost in the ring-buffer. > + * @read: Number of entries that have been read. > + * @subbufs_touched: Number of subbufs that have been filled. > + * @subbufs_lost: Number of subbufs lost to overrun. > + * @subbufs_read: Number of subbufs that have been read. Do we actually need the above 3 fields? What's the use case for them? I don't want to expose internals in the API unless they are needed. -- Steve