linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ftraced and suspend to ram
@ 2008-08-21 15:49 Steven Rostedt
  2008-08-21 18:15 ` Rafael J. Wysocki
  0 siblings, 1 reply; 27+ messages in thread
From: Steven Rostedt @ 2008-08-21 15:49 UTC (permalink / raw)
  To: Rafael J. Wysocki, Nigel Cunningham, Pavel Machek
  Cc: LKML, Ingo Molnar, Andrew Morton, Linus Torvalds


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


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2008-08-29 23:52 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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                         ` [PATCH] ftrace: disable tracing for suspend to ram Marcin Slusarz
2008-08-28  7:28                         ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).