LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
To: linux-kernel@vger.kernel.org
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>,
Josh Triplett <josh@joshtriplett.org>,
kvm-ppc@vger.kernel.org, Lai Jiangshan <jiangshanlai@gmail.com>,
linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
"Paul E. McKenney" <paulmck@linux.ibm.com>,
Paul Mackerras <paulus@ozlabs.org>,
rcu@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH RFC 2/5] trace: Use regular rcu_dereference_raw API
Date: Fri, 24 May 2019 19:49:30 -0400 [thread overview]
Message-ID: <20190524234933.5133-3-joel@joelfernandes.org> (raw)
In-Reply-To: <20190524234933.5133-1-joel@joelfernandes.org>
rcu_dereference_raw already does not do any tracing. There is no need to
use the _notrace variant of it and this series removes that API, so let us
use the regular variant here.
While at it, also replace the only user of
hlist_for_each_entry_rcu_notrace (which indirectly uses the
rcu_dereference_raw_notrace API) with hlist_for_each_entry_rcu which
also does not do any tracing.
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
kernel/trace/ftrace.c | 4 ++--
kernel/trace/ftrace_internal.h | 8 ++++----
kernel/trace/trace.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index b920358dd8f7..f7d5f0ee69de 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -706,7 +706,7 @@ ftrace_find_profiled_func(struct ftrace_profile_stat *stat, unsigned long ip)
if (hlist_empty(hhd))
return NULL;
- hlist_for_each_entry_rcu_notrace(rec, hhd, node) {
+ hlist_for_each_entry_rcu(rec, hhd, node) {
if (rec->ip == ip)
return rec;
}
@@ -1135,7 +1135,7 @@ __ftrace_lookup_ip(struct ftrace_hash *hash, unsigned long ip)
key = ftrace_hash_key(hash, ip);
hhd = &hash->buckets[key];
- hlist_for_each_entry_rcu_notrace(entry, hhd, hlist) {
+ hlist_for_each_entry_rcu(entry, hhd, hlist) {
if (entry->ip == ip)
return entry;
}
diff --git a/kernel/trace/ftrace_internal.h b/kernel/trace/ftrace_internal.h
index 0515a2096f90..e3530a284f46 100644
--- a/kernel/trace/ftrace_internal.h
+++ b/kernel/trace/ftrace_internal.h
@@ -6,22 +6,22 @@
/*
* Traverse the ftrace_global_list, invoking all entries. The reason that we
- * can use rcu_dereference_raw_notrace() is that elements removed from this list
+ * can use rcu_dereference_raw() is that elements removed from this list
* are simply leaked, so there is no need to interact with a grace-period
- * mechanism. The rcu_dereference_raw_notrace() calls are needed to handle
+ * mechanism. The rcu_dereference_raw() calls are needed to handle
* concurrent insertions into the ftrace_global_list.
*
* Silly Alpha and silly pointer-speculation compiler optimizations!
*/
#define do_for_each_ftrace_op(op, list) \
- op = rcu_dereference_raw_notrace(list); \
+ op = rcu_dereference_raw(list); \
do
/*
* Optimized for just a single item in the list (as that is the normal case).
*/
#define while_for_each_ftrace_op(op) \
- while (likely(op = rcu_dereference_raw_notrace((op)->next)) && \
+ while (likely(op = rcu_dereference_raw((op)->next)) && \
unlikely((op) != &ftrace_list_end))
extern struct ftrace_ops __rcu *ftrace_ops_list;
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ec439999f387..cb8d696d9cde 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2638,10 +2638,10 @@ static void ftrace_exports(struct ring_buffer_event *event)
preempt_disable_notrace();
- export = rcu_dereference_raw_notrace(ftrace_exports_list);
+ export = rcu_dereference_raw(ftrace_exports_list);
while (export) {
trace_process_export(export, event);
- export = rcu_dereference_raw_notrace(export->next);
+ export = rcu_dereference_raw(export->next);
}
preempt_enable_notrace();
--
2.22.0.rc1.257.g3120a18244-goog
next prev parent reply other threads:[~2019-05-24 23:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 23:49 [PATCH RFC 0/5] Remove some notrace RCU APIs Joel Fernandes (Google)
2019-05-24 23:49 ` [PATCH RFC 1/5] powerpc: Use regular rcu_dereference_raw API Joel Fernandes (Google)
2019-05-24 23:49 ` Joel Fernandes (Google) [this message]
2019-05-24 23:49 ` [PATCH RFC 3/5] hashtable: Use the regular hlist_for_each_entry_rcu API Joel Fernandes (Google)
2019-05-24 23:49 ` [PATCH RFC 4/5] rculist: Remove hlist_for_each_entry_rcu_notrace since no users Joel Fernandes (Google)
2019-05-26 16:20 ` Miguel Ojeda
2019-05-24 23:49 ` [PATCH RFC 5/5] rcu: Remove rcu_dereference_raw_notrace " Joel Fernandes (Google)
2019-05-25 3:24 ` [PATCH RFC 0/5] Remove some notrace RCU APIs Steven Rostedt
2019-05-25 8:14 ` Joel Fernandes
2019-05-25 11:08 ` Steven Rostedt
2019-05-25 14:19 ` Joel Fernandes
2019-05-25 15:50 ` Paul E. McKenney
2019-05-25 18:14 ` Joel Fernandes
2019-05-25 18:18 ` Joel Fernandes
2019-05-28 12:24 ` Paul E. McKenney
2019-05-28 19:00 ` Joel Fernandes
2019-05-28 20:00 ` Paul E. McKenney
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=20190524234933.5133-3-joel@joelfernandes.org \
--to=joel@joelfernandes.org \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=paulmck@linux.ibm.com \
--cc=paulus@ozlabs.org \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--subject='Re: [PATCH RFC 2/5] trace: Use regular rcu_dereference_raw API' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).