ftraced and suspend to ram

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Thursday, August 21, 2008 - 8:49 am

In latest 2.6.27(git) enabling dynamic ftrace makes resume from a suspend 
to ram reboot instead of resuming. Queued for 2.6.28 is a new method of 
recording mcount callers at compile time that does not have this issue.

But the new method is still too "green" to be pulled into 27, so the old 
ftraced (daemon method) needs to be fixed for 27.

The way dynamic ftrace works with the daemon method is this. On boot up 
the mcount function simply returns. When ftrace is initialized, it calls 
kstop_machine to modify the mcount function to call another function 
called "ftrace_record_ip". This new function will record in a preallocated 
hash (allocated by the ftrace initializer) all the callers of mcount. A 
check is made to see if the caller has already been put into the hash, and 
if so, it is not recorded again.

Later on a kernel thread ftraced is created. This kernel thread wakes up 
once a second and checks to see if any new functions were added to the 
hash. If so, it then calls kstop_machine and modifies those callers to 
mcount into nops.

Again, this daemon method makes resume from suspend to ram reboot instead 
of resuming. Now, I'm asking the s2r gurus, what did I miss? Do I need to 
add a "NO_FREEZE" flag or something to the "ftraced" kernel thread?

Just asking for some advice.

Thanks,

-- Steve

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

Messages in current thread:
ftraced and suspend to ram, Steven Rostedt, (Thu Aug 21, 8:49 am)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Thu Aug 21, 11:15 am)
Re: ftraced and suspend to ram, Steven Rostedt, (Thu Aug 21, 11:26 am)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Thu Aug 21, 11:37 am)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Thu Aug 21, 12:59 pm)
Re: ftraced and suspend to ram, Ingo Molnar, (Thu Aug 21, 9:46 pm)
Re: ftraced and suspend to ram, Pavel Machek, (Fri Aug 22, 12:23 am)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Fri Aug 22, 3:22 am)
Re: ftraced and suspend to ram, Marcin Slusarz, (Fri Aug 22, 3:35 am)
Re: ftraced and suspend to ram, Pavel Machek, (Fri Aug 22, 3:46 am)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Fri Aug 22, 9:39 am)
Re: ftraced and suspend to ram, Steven Rostedt, (Fri Aug 22, 1:33 pm)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Fri Aug 22, 1:52 pm)
Re: ftraced and suspend to ram, Marcin Slusarz, (Fri Aug 22, 1:54 pm)
Re: ftraced and suspend to ram, Steven Rostedt, (Fri Aug 22, 1:55 pm)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Fri Aug 22, 2:11 pm)
Re: ftraced and suspend to ram, Rafael J. Wysocki, (Fri Aug 22, 2:17 pm)
[PATCH] ftrace: disable tracing for suspend to ram, Steven Rostedt, (Wed Aug 27, 6:14 am)
Re: [PATCH] ftrace: disable tracing for suspend to ram, Rafael J. Wysocki, (Wed Aug 27, 6:26 am)
Re: [PATCH] ftrace: disable tracing for suspend to ram, Marcin Slusarz, (Wed Aug 27, 2:27 pm)
Re: [PATCH] ftrace: disable tracing for suspend to ram, Pavel Machek, (Thu Aug 28, 12:28 am)
[PATCH] ftrace: disable tracing for hibernation, Rafael J. Wysocki, (Thu Aug 28, 5:39 am)
Re: [PATCH] ftrace: disable tracing for hibernation, Ingo Molnar, (Thu Aug 28, 5:42 am)
Re: [PATCH] ftrace: disable tracing for hibernation, Steven Rostedt, (Thu Aug 28, 5:44 am)
Re: [PATCH] ftrace: disable tracing for suspend to ram, Steven Rostedt, (Fri Aug 29, 6:43 am)
Re: [PATCH] ftrace: disable tracing for hibernation, Pavel Machek, (Fri Aug 29, 4:53 pm)