Re: trying LTT on Linux 2.6.10

Tim Bird <[email protected]> Fri, 15 Feb 2008 18:35:37 -0800
Newsgroups gmane.linux.kernel.tracing
Message-ID <[email protected]>
shankar wrote:
> 
> Hi,
> 
>      I am trying to run LTT on  Linux 2.6.10 on MIPS-4000 using Frolov's patches
> I got from http://ltt.polymtl.ca/ltt-patches
> 
> I am getting a page_fault in TraceDaemon after the daemon has ran for
> few minutes.    

I was working on LTT on 2.6.11 MIPS just recently, and found a rather
nasty bug in the relayfs code.  I have a workaround for the bug which
worked for me (but it's not an elegant final solution.  Please see
the patch inlined below.

I don't know if this is a fix for the problem you're seeing or not.
Please let me know if it helps.

  -- Tim

P.S.  I have a bunch of other small fixes for MIPS.  I'm out of the
office at the moment so it's a bit difficult to post them now.  I'll
try to publish them sometime next week.

Index: ATI08/fs/relayfs/relay.c
===================================================================
--- ATI08.orig/fs/relayfs/relay.c	2008-02-06 13:06:48.000000000 -0800
+++ ATI08/fs/relayfs/relay.c	2008-02-06 13:08:53.000000000 -0800
@@ -217,7 +217,11 @@
  	schedule_delayed_work(&rchan->work, 1);

  	clear_readers(rchan);
-	kfree(rchan);
+	/* can't free rchan, because work might not be complete on it
+	 * in remove_rchan_file
+	 * This is a workaround, since it causes a (very small) memory leak
+	 */
+	/* kfree(rchan); */
  exit:
  	return err;
  }