From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>
Subject: [PATCH 3/7] ring-buffer: remove useless compile check for buffer_page size
Date: Wed, 17 Jun 2009 19:25:58 -0400 [thread overview]
Message-ID: <20090617232630.066076476@goodmis.org> (raw)
In-Reply-To: 20090617232555.164629684@goodmis.org
[-- Attachment #1: 0003-ring-buffer-remove-useless-compile-check-for-buffer_.patch --]
[-- Type: text/plain, Size: 1710 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
The original version of the ring buffer had a hack to map the
page struct that held the pages of the buffer to also be the structure
that the ring buffer would keep the pages in a link list.
This overlap of the page struct was very dangerous and that hack was
removed a while ago.
But there was a check to make sure the buffer_page never became bigger
than the page struct, and would fail the compile if it did. The
check was only meaningful when we had the hack. Now that we have separate
allocated descriptors for the buffer pages, we can remove this check.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/ring_buffer.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 6cf340e..162da23 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -620,12 +620,6 @@ static void rb_free_cpu_buffer(struct ring_buffer_per_cpu *cpu_buffer)
kfree(cpu_buffer);
}
-/*
- * Causes compile errors if the struct buffer_page gets bigger
- * than the struct page.
- */
-extern int ring_buffer_page_too_big(void);
-
#ifdef CONFIG_HOTPLUG_CPU
static int rb_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu);
@@ -648,11 +642,6 @@ struct ring_buffer *__ring_buffer_alloc(unsigned long size, unsigned flags,
int bsize;
int cpu;
- /* Paranoid! Optimizes out when all is well */
- if (sizeof(struct buffer_page) > sizeof(struct page))
- ring_buffer_page_too_big();
-
-
/* keep it in its own cache line */
buffer = kzalloc(ALIGN(sizeof(*buffer), cache_line_size()),
GFP_KERNEL);
--
1.6.3.1
--
next prev parent reply other threads:[~2009-06-17 23:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 23:25 [PATCH 0/7] [GIT PULL][for 2.6.31] ring-buffer: various clean ups Steven Rostedt
2009-06-17 23:25 ` [PATCH 1/7] ring-buffer: use BUF_PAGE_HDR_SIZE in calculating index Steven Rostedt
2009-06-17 23:25 ` [PATCH 2/7] ring-buffer: remove useless warn on check Steven Rostedt
2009-06-17 23:25 ` Steven Rostedt [this message]
2009-06-17 23:25 ` [PATCH 4/7] ring-buffer: check for less than two in size allocation Steven Rostedt
2009-06-17 23:26 ` [PATCH 5/7] ring-buffer: add locks around rb_per_cpu_empty Steven Rostedt
2009-06-17 23:26 ` [PATCH 6/7] ring-buffer: do not grab locks in nmi Steven Rostedt
2009-06-17 23:26 ` [PATCH 7/7] ring-buffer: have benchmark test print to trace buffer Steven Rostedt
2009-06-20 15:26 ` [PATCH 0/7] [GIT PULL][for 2.6.31] ring-buffer: various clean ups Ingo Molnar
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=20090617232630.066076476@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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