public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@suse.cz>,
	Ingo Molnar <mingo@elte.hu>,
	Nigel Cunningham <nigel@nigel.suspend2.net>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] ftrace: disable tracing for suspend to ram
Date: Wed, 27 Aug 2008 23:27:25 +0200	[thread overview]
Message-ID: <20080827212719.GA5531@joi> (raw)
In-Reply-To: <alpine.DEB.1.10.0808270844500.7871@gandalf.stny.rr.com>

On Wed, Aug 27, 2008 at 09:14:40AM -0400, Steven Rostedt wrote:
> 
> I've been painstakingly debugging the issue with suspend to ram and 
> ftraced. The 2.6.28 code does not have this issue, but since the mcount 
> recording is not going to be in 27, this must be solved for the ftrace 
> daemon version.
> 
> The resume from suspend to ram would reboot because it was triple 
> faulting. Debugging further, I found that calling the mcount function 
> itself was not an issue, but it would fault when it incremented 
> preempt_count. preempt_count is on the tasks info structure that is on the 
> low memory address of the task's stack.  For some reason, it could not 
> write to it. Resuming out of suspend to ram does quite a lot of funny 
> tricks to get to work, so it is not surprising at all that simply doing a 
> preempt_disable() would cause a fault.
> 
> Thanks to Rafael for suggesting to add a "while (1);" to find the place in 
> resuming that is causing the fault. I would place the loop somewhere in 
> the code, compile and reboot and see if it would either reboot (hit the 
> fault) or simply hang (hit the loop).  Doing this over and over again, I 
> narrowed it down that it was happening in enable_nonboot_cpus.
> 
> At this point, I found that it is easier to simply disable tracing around 
> the suspend code, instead of searching for the particular function that 
> can not handle doing a preempt_disable.
> 
> This patch disables the tracer as it suspends and reenables it on resume.
> 
> I tested this patch on my Laptop, and it can resume fine with the patch.
> 
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>

You can add my:
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>

Thanks!

Marcin

  parent reply	other threads:[~2008-08-27 21:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 15:49 ftraced and suspend to ram Steven Rostedt
2008-08-21 18:15 ` Rafael J. Wysocki
2008-08-21 18:26   ` Steven Rostedt
2008-08-21 18:37     ` Rafael J. Wysocki
2008-08-21 19:59       ` Rafael J. Wysocki
2008-08-22  4:46         ` Ingo Molnar
2008-08-22  7:23           ` Pavel Machek
2008-08-22 10:35             ` Marcin Slusarz
2008-08-22 10:46               ` Pavel Machek
2008-08-22 20:33                 ` Steven Rostedt
2008-08-22 20:52                   ` Rafael J. Wysocki
2008-08-22 20:55                     ` Steven Rostedt
2008-08-22 21:11                       ` Rafael J. Wysocki
2008-08-27 13:14                       ` [PATCH] ftrace: disable tracing for " Steven Rostedt
2008-08-27 13:26                         ` Rafael J. Wysocki
2008-08-28 12:39                           ` [PATCH] ftrace: disable tracing for hibernation Rafael J. Wysocki
2008-08-28 12:42                             ` Ingo Molnar
2008-08-28 12:44                             ` Steven Rostedt
2008-08-29 23:53                             ` Pavel Machek
2008-08-27 21:27                         ` Marcin Slusarz [this message]
2008-08-28  7:28                         ` [PATCH] ftrace: disable tracing for suspend to ram Pavel Machek
2008-08-29 13:43                           ` Steven Rostedt
2008-08-22 16:39               ` ftraced and " Rafael J. Wysocki
2008-08-22 20:54                 ` Marcin Slusarz
2008-08-22 21:17                   ` Rafael J. Wysocki
2008-08-23  4:18                 ` Russ Dill
2008-08-22 10:22           ` Rafael J. Wysocki

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=20080827212719.GA5531@joi \
    --to=marcin.slusarz@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    --cc=rostedt@goodmis.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