Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582434 > unrolled thread

[PATCH] trace: Correct comments about list of pages in buffer

Started byJoel Fernandes <joelaf@google.com>
First post2017-02-16 11:20 +0100
Last post2017-02-16 15:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] trace: Correct comments about list of pages in buffer Joel Fernandes <joelaf@google.com> - 2017-02-16 11:20 +0100
    Re: [PATCH] trace: Correct comments about list of pages in buffer Steven Rostedt <rostedt@goodmis.org> - 2017-02-16 15:40 +0100

#1582434 — [PATCH] trace: Correct comments about list of pages in buffer

FromJoel Fernandes <joelaf@google.com>
Date2017-02-16 11:20 +0100
Subject[PATCH] trace: Correct comments about list of pages in buffer
Message-ID<tbrkm-4KJ-13@gated-at.bofh.it>
Comments related to list of pages in the ring buffer seem to be incorrect.
This patch corrects them.

Signed-off-by: Joel Fernandes <joelaf@google.com>
---
 kernel/trace/trace.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d7449783987a..94d508c08c7e 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -262,11 +262,11 @@ unsigned long long ns2usecs(u64 nsec)
 /*
  * The global_trace is the descriptor that holds the tracing
  * buffers for the live tracing. For each CPU, it contains
- * a link list of pages that will store trace entries. The
- * page descriptor of the pages in the memory is used to hold
- * the link list by linking the lru item in the page descriptor
- * to each of the pages in the buffer per CPU.
- *
+ * a link list of pages that will store trace entries.
+ * Each page is wrapped by a buffer_page descriptor which contains
+ * a list element used to hold the list of pages by linking with
+ * other list elements of other buffer_page descriptors (for each
+ * of the pages) in the ring buffer per CPU.
  * For each active CPU there is a data field that holds the
  * pages for the buffer for that CPU. Each CPU has the same number
  * of pages allocated for its buffer.
-- 
2.11.0.483.g087da7b7c-goog

[toc] | [next] | [standalone]


#1582613

FromSteven Rostedt <rostedt@goodmis.org>
Date2017-02-16 15:40 +0100
Message-ID<tbvnX-7s2-1@gated-at.bofh.it>
In reply to#1582434
On Thu, 16 Feb 2017 02:17:28 -0800
Joel Fernandes <joelaf@google.com> wrote:

> Comments related to list of pages in the ring buffer seem to be incorrect.
> This patch corrects them.
> 
> Signed-off-by: Joel Fernandes <joelaf@google.com>
> ---
>  kernel/trace/trace.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index d7449783987a..94d508c08c7e 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -262,11 +262,11 @@ unsigned long long ns2usecs(u64 nsec)
>  /*
>   * The global_trace is the descriptor that holds the tracing
>   * buffers for the live tracing. For each CPU, it contains
> - * a link list of pages that will store trace entries. The
> - * page descriptor of the pages in the memory is used to hold
> - * the link list by linking the lru item in the page descriptor
> - * to each of the pages in the buffer per CPU.

Wow, that's a description of the very first (and poor) implementation
of the ring buffer.

> - *
> + * a link list of pages that will store trace entries.
> + * Each page is wrapped by a buffer_page descriptor which contains
> + * a list element used to hold the list of pages by linking with
> + * other list elements of other buffer_page descriptors (for each
> + * of the pages) in the ring buffer per CPU.

Actually, this comment doesn't even belong here anymore. The code lives
elsewhere.

Want to send another patch that just nukes this?

Thanks!

-- Steve

>   * For each active CPU there is a data field that holds the
>   * pages for the buffer for that CPU. Each CPU has the same number
>   * of pages allocated for its buffer.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web