The patch titled freezer: measure freezing time has been added to the -mm tree. Its filename is freezer-measure-freezing-time.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: freezer: measure freezing time From: Rafael J. Wysocki <rjw@xxxxxxx> Measure the time of the freezing of tasks, even if it doesn't fail. Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> Acked-by: Pavel Machek <pavel@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/power/process.c | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff -puN kernel/power/process.c~freezer-measure-freezing-time kernel/power/process.c --- a/kernel/power/process.c~freezer-measure-freezing-time +++ a/kernel/power/process.c @@ -190,6 +190,11 @@ static int try_to_freeze_tasks(int freez struct task_struct *g, *p; unsigned long end_time; unsigned int todo; + struct timeval start, end; + s64 elapsed_csecs64; + unsigned int elapsed_csecs; + + do_gettimeofday(&start); end_time = jiffies + TIMEOUT; refrigerator_called = 0; @@ -226,6 +231,11 @@ static int try_to_freeze_tasks(int freez break; } while (todo); + do_gettimeofday(&end); + elapsed_csecs64 = timeval_to_ns(&end) - timeval_to_ns(&start); + do_div(elapsed_csecs64, NSEC_PER_SEC / 100); + elapsed_csecs = elapsed_csecs64; + if (todo) { /* This does not unfreeze processes that are already frozen * (we have slightly ugly calling convention in that respect, @@ -233,10 +243,9 @@ static int try_to_freeze_tasks(int freez * but it cleans up leftover PF_FREEZE requests. */ printk("\n"); - printk(KERN_ERR "Freezing of %s timed out after %d seconds " + printk(KERN_ERR "Freezing of tasks failed after %d.%02d seconds " "(%d tasks refusing to freeze):\n", - freeze_user_space ? "user space " : "tasks ", - TIMEOUT / HZ, todo); + elapsed_csecs / 100, elapsed_csecs % 100, todo); show_state(); read_lock(&tasklist_lock); do_each_thread(g, p) { @@ -247,6 +256,9 @@ static int try_to_freeze_tasks(int freez task_unlock(p); } while_each_thread(g, p); read_unlock(&tasklist_lock); + } else { + printk("(elapsed %d.%02d seconds) ", elapsed_csecs / 100, + elapsed_csecs % 100); } return todo ? -EBUSY : 0; _ Patches currently in -mm which might be from rjw@xxxxxxx are origin.patch pm-move-definition-of-struct-pm_ops-to-suspendh.patch pm-rename-struct-pm_ops-and-related-things.patch pm-rework-struct-platform_suspend_ops.patch pm-make-suspend_ops-static.patch pm-rework-struct-hibernation_ops.patch pm-rename-hibernation_ops-to-platform_hibernation_ops.patch freezer-document-relationship-with-memory-shrinking.patch freezer-do-not-sync-filesystems-from-freeze_processes.patch freezer-prevent-new-tasks-from-inheriting-tif_freeze-set.patch freezer-introduce-freezer-firendly-waiting-macros.patch freezer-do-not-send-signals-to-kernel-threads.patch unexport-pm_power_off_prepare.patch pm_trace-displays-the-wrong-time-from-the-rtc.patch freezer-be-more-verbose.patch freezer-use-wait-queue-instead-of-busy-looping.patch freezer-measure-freezing-time.patch shrink_slab-handle-bad-shrinkers.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html