Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Tom Zanussi <zanussi@...>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@...>, <jens.axboe@...>, <linux-kernel@...>
Date: Tuesday, October 14, 2008 - 3:05 am

On Tue, 2008-10-14 at 08:13 +0300, Pekka Enberg wrote:

Eduard, here's a fix for the userspace counterpart:

From: Pekka Enberg <penberg@cs.helsinki.fi>
Date: Tue, 14 Oct 2008 10:03:51 +0300
Subject: [PATCH] kmemtrace: enable tracing in kmemtraced

If kmemtrace is not enabled at boot, we need to enable it before we start
relaying data to userspace.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 kmemtraced.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kmemtraced.c b/kmemtraced.c
index 217478d..5cc1ada 100644
--- a/kmemtraced.c
+++ b/kmemtraced.c
@@ -165,8 +165,6 @@ int main(int argc, char *argv[])
 	if (!readers)
 		panic("Out of memory!\n");
 
-	write_str("/sys/kernel/debug/kmemtrace/enabled", "0");
-
 	printf("Copying /proc/kallsyms...\n");
 	copy_kallsyms();
 
@@ -180,6 +178,8 @@ int main(int argc, char *argv[])
 			      strerror(errno));
 	}
 
+	write_str("/sys/kernel/debug/kmemtrace/enabled", "1");
+
 	printf("Logging... Press Control-C to stop.\n");
 
 	while (sigwait(&signals, &signal) == 0) {
-- 
1.5.4.3



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PROBLEM] hard-lock with kmemtrace, relayfs, and splice, Pekka Enberg, (Fri Oct 10, 5:42 am)
Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice, Eduard - Gabriel Munteanu..., (Sat Oct 25, 10:04 am)
Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice, Pekka Enberg, (Tue Oct 14, 3:05 am)
Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice, Eduard - Gabriel Munteanu..., (Tue Oct 14, 3:30 am)
Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice, Eduard - Gabriel Munteanu..., (Sat Oct 11, 2:17 pm)
Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice, Eduard - Gabriel Munteanu..., (Fri Oct 10, 7:51 am)