From: Vincent Donnefort <vdonnefort@google.com>
To: rostedt@goodmis.org, mhiramat@kernel.org,
linux-trace-kernel@vger.kernel.org
Cc: mathieu.desnoyers@efficios.com, kernel-team@android.com,
linux-kernel@vger.kernel.org, devnexen@gmail.com,
Vincent Donnefort <vdonnefort@google.com>
Subject: [PATCH v2 2/2] ring-buffer: Remove unnecessary cpumask_test_cpu
Date: Wed, 16 Sep 2026 16:28:13 +0100 [thread overview]
Message-ID: <20260916152813.105082-3-vdonnefort@google.com> (raw)
In-Reply-To: <20260916152813.105082-1-vdonnefort@google.com>
for_each_buffer_cpu() already iterates over buffer->cpumask. Remove the
unnecessary cpumask_test_cpu() found in ring_buffer_subbuf_order_set().
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
---
kernel/trace/ring_buffer.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 73311c4fc556..2087bbfd8f20 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -7488,10 +7488,6 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
/* Make sure all new buffers are allocated, before deleting the old ones */
for_each_buffer_cpu(buffer, cpu) {
-
- if (!cpumask_test_cpu(cpu, buffer->cpumask))
- continue;
-
cpu_buffer = buffer->buffers[cpu];
/* Update the number of pages to match the new size */
@@ -7522,9 +7518,6 @@ int ring_buffer_subbuf_order_set(struct trace_buffer *buffer, int order)
struct list_head old_pages;
unsigned long flags;
- if (!cpumask_test_cpu(cpu, buffer->cpumask))
- continue;
-
cpu_buffer = buffer->buffers[cpu];
raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
--
2.55.0.1082.g2b9226bbc0-goog
prev parent reply other threads:[~2026-09-16 15:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 15:28 [PATCH v2 0/2] ring-buffer: Clean up resize_disabled checks Vincent Donnefort
2026-09-16 15:28 ` [PATCH v2 1/2] " Vincent Donnefort
2026-09-16 15:28 ` Vincent Donnefort [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=20260916152813.105082-3-vdonnefort@google.com \
--to=vdonnefort@google.com \
--cc=devnexen@gmail.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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®