Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp510214rwl; Wed, 29 Mar 2023 05:14:09 -0700 (PDT) X-Google-Smtp-Source: AKy350btTBEREbXeJqSl5TJzPkaDCZJe7HrvKGHgx0t9+YrFt/7HRjr3ty+14WYv3Lv7NyciB9Mq X-Received: by 2002:a05:6402:26d5:b0:4af:7bdc:188e with SMTP id x21-20020a05640226d500b004af7bdc188emr2177067edd.16.1680092049454; Wed, 29 Mar 2023 05:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680092049; cv=none; d=google.com; s=arc-20160816; b=rvWRRQOYOimh6Hvxn8jPWC4EgSPpw+x4TZFofqa51ZdSUjZlYZv65KjwaIYn1xaZm1 PuAUtBAuh//96AthT+JkxngF2hSy1454+gVB8fkii72gc2AoSjLiK+OiKJO/JSbRnKye h/YK5GlBikJEhJ64ZRCSdmSMa+hs6S3a95djHBTWGZAXqHx7SqVltJlsud0Qjj4Arcny jSbxx1BRb+o72wXJNU2wA9lRslOTshzMN8KNY5fHleq4XXSXokX58ofan+o93UMORBy3 MgINf9PWhb4HJ3VbVIWaqUWS0O2nCIsFsiCE2B2eW8SfzfbMiZeTPUh/LgoayouIZB74 qZHA== 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=EdTr3+AUQbgYyby/9IJtkfFbCjlT4E1B2uFoohSiDgE=; b=OOO8cjXawKTIQHqs0hFjikNzV/EiK3hLz5WBROfwj+0oGcfB8DkKD2P+y0160ZM2m5 LQN9V1yNugJ9XRNrRZvViowvMVAv8JxlncGer1Jn1WtsaODF6kTubzp2REqT60GX3IcT ++8Lqzk4z4sBoGkxhD4ov+Qgi7ZYuvFo+tGJsx7uMmvOsN1+vaNnTMf+2tpL3KgEE1VU hXKHq9E85PdlIx2VM+P+NL3UIPUNWsFzIcyVgw1kNJ6EYTw8WywjInA79KIzM3FMFnNH G9OVewxVCByqo5ffDyt25Jzo2OpHg0McXjRBUSFeWVsqyEgqAYr8XE7Wi6IShts0saMl 7rgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vp10-20020a170907a48a00b009329c6f66adsi30515222ejc.378.2023.03.29.05.13.44; Wed, 29 Mar 2023 05:14:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229495AbjC2MIQ (ORCPT + 99 others); Wed, 29 Mar 2023 08:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbjC2MIN (ORCPT ); Wed, 29 Mar 2023 08:08:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 054553C0F; Wed, 29 Mar 2023 05:08:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AA7F5B822E4; Wed, 29 Mar 2023 12:08:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26AC6C433D2; Wed, 29 Mar 2023 12:08:07 +0000 (UTC) Date: Wed, 29 Mar 2023 08:07:58 -0400 From: Steven Rostedt To: Vincent Donnefort Cc: mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v2 1/2] ring-buffer: Introducing ring-buffer mapping functions Message-ID: <20230329080758.0e730796@rorschach.local.home> In-Reply-To: <20230329070353.1e1b443b@gandalf.local.home> References: <20230322102244.3239740-1-vdonnefort@google.com> <20230322102244.3239740-2-vdonnefort@google.com> <20230328224411.0d69e272@gandalf.local.home> <20230329070353.1e1b443b@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (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=-2.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Mar 2023 07:03:53 -0400 Steven Rostedt wrote: > struct ring_buffer_meta_page_header { > #if __BITS_PER_LONG == 64 > __u64 entries; > __u64 overrun; > #else > __u32 entries; > __u32 overrun; > #endif > __u32 pages_touched; > __u32 meta_page_size; > __u32 reader_page; /* page ID for the reader page */ > __u32 nr_data_pages; /* doesn't take into account the reader_page */ > }; > > BTW, shouldn't the nr_data_pages take into account the reader page? As it > is part of the array we traverse isn't it? Ah, I guess nr_data_pages is the length of the index mapping, not the array of pages mapped? -- Steve