public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <andi@firstfloor.org>
Subject: [for-next][PATCH 8/8] ring-buffer: Force rb_end_commit() and rb_set_commit_to_write() inline
Date: Tue, 29 Nov 2016 10:06:22 -0500	[thread overview]
Message-ID: <20161129150718.548151386@goodmis.org> (raw)
In-Reply-To: 20161129150614.797594570@goodmis.org

[-- Attachment #1: 0008-ring-buffer-Force-rb_end_commit-and-rb_set_commit_to.patch --]
[-- Type: text/plain, Size: 1200 bytes --]

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

Both rb_end_commit() and rb_set_commit_to_write() are in the fast path of
the ring buffer recording. Make sure they are always inlined.

Link: http://lkml.kernel.org/r/20161121183700.GW26852@two.firstfloor.org

Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/ring_buffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 04579a0c7711..f17476f9d7f4 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2386,7 +2386,7 @@ static void rb_start_commit(struct ring_buffer_per_cpu *cpu_buffer)
 	local_inc(&cpu_buffer->commits);
 }
 
-static void
+static __always_inline void
 rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
 {
 	unsigned long max_count;
@@ -2441,7 +2441,7 @@ rb_set_commit_to_write(struct ring_buffer_per_cpu *cpu_buffer)
 		goto again;
 }
 
-static inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
+static __always_inline void rb_end_commit(struct ring_buffer_per_cpu *cpu_buffer)
 {
 	unsigned long commits;
 
-- 
2.10.2

      parent reply	other threads:[~2016-11-29 15:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 15:06 [for-next][PATCH 0/8] tracing: Some micro optimizations Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 1/8] tracing: Create a always_inlined __trace_buffer_lock_reserve() Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 2/8] ring-buffer: Make rb_reserve_next_event() always inlined Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 3/8] ring-buffer: Always inline rb_event_data() Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 4/8] tracing: Make tracepoint_printk a static_key Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 5/8] tracing: Make __buffer_unlock_commit() always_inline Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 6/8] ring-buffer: Force inline of hotpath helper functions Steven Rostedt
2016-11-29 15:06 ` [for-next][PATCH 7/8] ring-buffer: Froce rb_update_write_stamp() to be inlined Steven Rostedt
2016-11-29 15:06 ` Steven Rostedt [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=20161129150718.548151386@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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