From: Petr Mladek <pmladek@suse.cz>
To: Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Jiri Kosina <jkosina@suse.cz>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Petr Mladek <pmladek@suse.cz>
Subject: [PATCH v5 5/8] x86: do not trace __probe_kernel_read
Date: Tue, 3 Dec 2013 14:21:24 +0100 [thread overview]
Message-ID: <1386076887-2655-6-git-send-email-pmladek@suse.cz> (raw)
In-Reply-To: <1386076887-2655-1-git-send-email-pmladek@suse.cz>
probe_kernel_read is used when modifying function calls in ftrace_replace_code,
see arch/x86/kernel/ftrace.c. On x86, the code is replaced using int3 guard.
All functions are patched in parallel to reduce an expensive synchronization
of all CPUs. The result is that all affected functions are called via
ftrace_int3_handler during the process.
ftrace_int3_handler is relatively slow because it has to check whether
it is responsible for the handled IP. Therefore we should not modify
functions that used during patching. It would slowdown the patching.
I tried to switch between 7 tracers: blk, branch, function_graph, wakeup_rt,
irqsoff, function, and nop. Every tracer has also been enabled and disabled.
With 500 cycles, I got these times before this commit:
real 18m2.477s 18m8.654s 18m9.196s
user 0m0.008s 0m0.008s 0m0.012s
sys 0m17.316s 0m17.104s 0m17.300s
and after this commit:
real 16m14.390s 16m15.200s 16m19.632s
user 0m0.028s 0m0.024s 0m0.028s
sys 0m23.788s 0m23.812s 0m23.804s
Signed-off-by: Petr Mladek <pmladek@suse.cz>
---
mm/maccess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/maccess.c b/mm/maccess.c
index d53adf9ba84b..bed9ee854ea0 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
@@ -18,7 +18,7 @@
long __weak probe_kernel_read(void *dst, const void *src, size_t size)
__attribute__((alias("__probe_kernel_read")));
-long __probe_kernel_read(void *dst, const void *src, size_t size)
+long notrace __probe_kernel_read(void *dst, const void *src, size_t size)
{
long ret;
mm_segment_t old_fs = get_fs();
--
1.8.4
next prev parent reply other threads:[~2013-12-03 13:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 13:21 [PATCH v5 0/8] x86: use new text_poke_bp in ftrace Petr Mladek
2013-12-03 13:21 ` [PATCH v5 1/8] x86: allow to handle errors in text_poke function family Petr Mladek
2013-12-07 1:20 ` Masami Hiramatsu
2013-12-03 13:21 ` [PATCH v5 2/8] x86: allow to call text_poke_bp during boot Petr Mladek
2013-12-03 13:21 ` [PATCH v5 3/8] x86: add generic function to modify more calls using int3 framework Petr Mladek
2013-12-03 13:21 ` [PATCH v5 4/8] x86: speed up int3-based patching using direct write Petr Mladek
2013-12-03 13:21 ` Petr Mladek [this message]
2013-12-03 13:21 ` [PATCH v5 6/8] x86: modify ftrace function using the new int3-based framework Petr Mladek
2013-12-03 13:21 ` [PATCH v5 7/8] x86: patch all traced function calls using the " Petr Mladek
2013-12-03 13:21 ` [PATCH v5 8/8] x86: enable/disable ftrace graph call using new " Petr Mladek
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=1386076887-2655-6-git-send-email-pmladek@suse.cz \
--to=pmladek@suse.cz \
--cc=fweisbec@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=rostedt@goodmis.org \
--cc=x86@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
all inboxes | Powered by JetHome®