From: Steven Rostedt <rostedt@goodmis.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"kay.sievers" <kay.sievers@vrfy.org>,
Fengguang Wu <fengguang.wu@intel.com>,
Ingo Molnar <mingo@elte.hu>,
AndrewMorton <akpm@linux-foundation.org>
Subject: Re: [PATCH] printk: Add printk_flush() to force buffered text to console
Date: Fri, 22 Jun 2012 06:45:39 -0400 [thread overview]
Message-ID: <1340361939.27036.224.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20120622071718.GC22167@gmail.com>
On Fri, 2012-06-22 at 09:17 +0200, Ingo Molnar wrote:
> Maybe also add the actual usage sites, to demonstrate how it's
> going to be used?
Here's the places that I added (and tested) the pr_flush().
I even added 'set_current_task(TASK_UNINTERRUPTIBLE);
schedule_timeout(5*HZ);' to see if it does flush, and it worked fine.
-- Steve
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 49249c2..f7f2cd0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -825,6 +825,7 @@ int register_tracer(struct tracer *type)
/* the test is responsible for initializing and enabling */
pr_info("Testing tracer %s: ", type->name);
+ pr_flush();
ret = type->selftest(type, tr);
/* the test is responsible for resetting too */
current_trace = saved_tracer;
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 29111da..84b674e 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -1606,6 +1606,7 @@ static __init void event_trace_self_tests(void)
#endif
pr_info("Testing event %s: ", call->name);
+ pr_flush();
/*
* If an event is already enabled, someone is using
@@ -1635,6 +1636,7 @@ static __init void event_trace_self_tests(void)
continue;
pr_info("Testing event system %s: ", system->name);
+ pr_flush();
ret = __ftrace_set_clr_event(NULL, system->name, NULL, 1);
if (WARN_ON_ONCE(ret)) {
@@ -1657,6 +1659,7 @@ static __init void event_trace_self_tests(void)
pr_info("Running tests on all trace events:\n");
pr_info("Testing all events: ");
+ pr_flush();
ret = __ftrace_set_clr_event(NULL, NULL, NULL, 1);
if (WARN_ON_ONCE(ret)) {
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 288541f..9638639 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -161,6 +161,7 @@ static void print_counts(void)
trace_selftest_test_probe3_cnt,
trace_selftest_test_global_cnt,
trace_selftest_test_dyn_cnt);
+ pr_flush();
}
static void reset_counts(void)
@@ -184,6 +185,7 @@ static int trace_selftest_ops(int cnt)
printk(KERN_CONT "PASSED\n");
pr_info("Testing dynamic ftrace ops #%d: ", cnt);
+ pr_flush();
ftrace_enabled = 1;
reset_counts();
@@ -315,6 +317,7 @@ int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
/* The ftrace test PASSED */
printk(KERN_CONT "PASSED\n");
pr_info("Testing dynamic ftrace: ");
+ pr_flush();
/* enable tracing, and record the filter function */
ftrace_enabled = 1;
next prev parent reply other threads:[~2012-06-22 10:45 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 23:52 [PATCH] printk: Add printk_flush() to force buffered text to console Steven Rostedt
2012-06-22 7:17 ` Ingo Molnar
2012-06-22 10:45 ` Steven Rostedt [this message]
2012-06-22 8:24 ` Joe Perches
2012-06-22 10:48 ` Steven Rostedt
2012-06-22 21:54 ` Andrew Morton
2012-06-22 23:41 ` Steven Rostedt
2012-06-22 23:49 ` Andrew Morton
2012-06-22 23:56 ` Steven Rostedt
2012-06-23 6:13 ` Ingo Molnar
2012-06-23 7:44 ` Joe Perches
2012-06-25 8:45 ` Ingo Molnar
2012-06-25 16:53 ` Joe Perches
2012-06-23 11:47 ` Kay Sievers
2012-06-23 12:04 ` Fengguang Wu
2012-06-23 15:28 ` Joe Perches
2012-06-23 16:56 ` Kay Sievers
2012-06-25 9:09 ` [PATCH] printk: Revert the buffered-printk() changes for now Ingo Molnar
2012-06-25 10:06 ` Kay Sievers
2012-06-25 13:42 ` Steven Rostedt
2012-06-25 14:07 ` Ingo Molnar
2012-06-25 14:48 ` Steven Rostedt
2012-06-25 16:40 ` Greg Kroah-Hartman
2012-06-27 5:52 ` Ingo Molnar
2012-06-27 5:59 ` Joe Perches
2012-07-06 11:04 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 4:46 [PATCH] printk: Add printk_flush() to force buffered text to console Steven Rostedt
2012-06-14 4:59 ` Greg Kroah-Hartman
2012-06-14 11:01 ` Steven Rostedt
2012-06-14 15:41 ` Greg Kroah-Hartman
2012-06-14 17:07 ` Steven Rostedt
2012-06-15 4:22 ` Fengguang Wu
2012-06-15 4:30 ` Greg Kroah-Hartman
2012-06-15 4:37 ` Fengguang Wu
2012-06-15 12:04 ` Ingo Molnar
2012-06-15 23:13 ` Greg Kroah-Hartman
2012-06-15 23:53 ` Steven Rostedt
2012-06-18 23:03 ` Greg Kroah-Hartman
2012-06-19 1:28 ` Steven Rostedt
2012-06-20 12:25 ` Ingo Molnar
2012-06-21 17:13 ` Greg Kroah-Hartman
2012-06-21 17:41 ` Steven Rostedt
2012-06-21 18:17 ` Joe Perches
2012-06-21 18:22 ` Joe Perches
2012-06-21 18:29 ` Steven Rostedt
2012-06-21 18:39 ` Joe Perches
2012-06-21 18:49 ` Steven Rostedt
2012-06-21 18:55 ` Joe Perches
2012-06-21 19:38 ` Steven Rostedt
2012-06-16 6:59 ` Ingo Molnar
2012-06-16 12:51 ` Joe Perches
2012-06-16 15:38 ` Greg Kroah-Hartman
2012-06-16 15:40 ` Greg Kroah-Hartman
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=1340361939.27036.224.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).