From: "Frank A. Cancio Bello" <frank@generalsoftwareinc.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: joel@joelfernandes.org, saiprakash.ranjan@codeaurora.org
Subject: [RFC 2/2] ** do not apply this patch ** Just for illustration purposes
Date: Wed, 13 Nov 2019 11:33:27 -0500 [thread overview]
Message-ID: <141cb10cc2eabc5c3130496f12d84dd1ef247e20.1573661658.git.frank@generalsoftwareinc.com> (raw)
In-Reply-To: <cover.1573661658.git.frank@generalsoftwareinc.com>
Prints a message that will allow us to evaluate the number of pages
allocated by each CPU buffer as well the main values that participate
in its calculation.
$ echo 0 > /sys/kernel/debug/tracing/tracing_on
$ echo 4096 > /sys/kernel/debug/tracing/buffer_size_kb
.... e.g. of output:
PAGE_SIZE: 4096, BUF_PAGE_HDR_SIZE: 16, size: 4194304, nr_pages: 1029
Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
---
kernel/trace/ring_buffer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 66358d66c933..c10b6bcb29b9 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1730,6 +1730,8 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
return size;
nr_pages = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
+ printk(KERN_ALERT "PAGE_SIZE: %lu, BUF_PAGE_HDR_SIZE: %lu, size: %lu, nr_pages: %ld",
+ PAGE_SIZE, BUF_PAGE_HDR_SIZE, size, nr_pages);
/* we need a minimum of two pages */
if (nr_pages < 2)
--
2.17.1
prev parent reply other threads:[~2019-11-13 16:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 16:31 [RFC 0/2] docs: ftrace: Clarify the RAM impact of buffer_size_kb Frank A. Cancio Bello
2019-11-13 16:32 ` [RFC 1/2] " Frank A. Cancio Bello
2019-11-13 16:37 ` Steven Rostedt
2019-11-14 20:20 ` Joel Fernandes
2019-11-14 21:36 ` Steven Rostedt
2019-11-15 4:24 ` Frank A. Cancio Bello
2019-11-15 13:30 ` Steven Rostedt
2019-11-15 15:59 ` Frank A. Cancio Bello
2019-11-15 16:03 ` Steven Rostedt
2019-11-13 16:33 ` Frank A. Cancio Bello [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=141cb10cc2eabc5c3130496f12d84dd1ef247e20.1573661658.git.frank@generalsoftwareinc.com \
--to=frank@generalsoftwareinc.com \
--cc=corbet@lwn.net \
--cc=joel@joelfernandes.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=saiprakash.ranjan@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®