From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Tom Zanussi <zanussi@comcast.net>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>,
jens.axboe@oracle.com, linux-kernel@vger.kernel.org
Subject: Re: [PROBLEM] hard-lock with kmemtrace, relayfs, and splice
Date: Tue, 14 Oct 2008 10:05:30 +0300 [thread overview]
Message-ID: <1223967930.18017.2.camel@penberg-laptop> (raw)
In-Reply-To: <48F42A93.1040004@cs.helsinki.fi>
On Tue, 2008-10-14 at 08:13 +0300, Pekka Enberg wrote:
> Hi Tom,
>
> Tom Zanussi wrote:
> > To me, that sounds like how it should work - if kmemtrace is disabled,
> > it shouldn't be logging anything, and that's in fact what I saw when
> > debugging this - it started out disabled and therefore nothing being
> > logged to relay (printks confirmed that). When I wrote 1 to the enabled
> > file, data started getting logged to relay and to the *.out files.
> >
> > So I don't know why the enabled state behaves the way it does, or if
> > it's unexpected, but that anyway doesn't seem like a relay problem to
> > me.
>
> Oh, right. Looking at kmemtraced.c, we never enable kmemtrace, just
> disable it (which doesn't make much sense). Bug in README or the code.
Eduard, here's a fix for the userspace counterpart:
>From aa95e997458fd4d2a3b9a5c75e1452e22a3159af Mon Sep 17 00:00:00 2001
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
next prev parent reply other threads:[~2008-10-14 7:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 21:29 [ANNOUNCE] kmemtrace-user repo update Eduard - Gabriel Munteanu
[not found] ` <1223386477.28348.42.camel@penberg-laptop>
[not found] ` <1223623191.8959.26.camel@penberg-laptop>
[not found] ` <1223628687.8959.37.camel@penberg-laptop>
[not found] ` <1223629803.8959.40.camel@penberg-laptop>
2008-10-10 9:42 ` [PROBLEM] hard-lock with kmemtrace, relayfs, and splice Pekka Enberg
2008-10-10 11:51 ` Eduard - Gabriel Munteanu
2008-10-11 4:58 ` Tom Zanussi
2008-10-11 18:17 ` Eduard - Gabriel Munteanu
2008-10-13 6:57 ` Pekka Enberg
2008-10-14 4:03 ` Tom Zanussi
2008-10-14 5:13 ` Pekka Enberg
2008-10-14 5:46 ` Tom Zanussi
2008-10-14 6:58 ` Pekka Enberg
2008-10-14 7:30 ` Eduard - Gabriel Munteanu
2008-10-14 7:05 ` Pekka Enberg [this message]
2008-10-24 4:44 ` Peter Teoh
2008-10-24 14:15 ` Pekka Enberg
2008-10-25 0:56 ` Peter Teoh
2008-10-25 14:04 ` Eduard - Gabriel Munteanu
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=1223967930.18017.2.camel@penberg-laptop \
--to=penberg@cs.helsinki.fi \
--cc=eduard.munteanu@linux360.ro \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zanussi@comcast.net \
/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
Powered by JetHome