From patchwork Fri Oct 30 14:23:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 37302 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id AEC9AB7C2E for ; Sat, 31 Oct 2009 01:24:23 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1N3sOm-0005sh-BN; Fri, 30 Oct 2009 14:24:16 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1N3sO2-0005bL-1G for kernel-team@lists.ubuntu.com; Fri, 30 Oct 2009 14:23:30 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1N3sO1-0002cf-W9 for ; Fri, 30 Oct 2009 14:23:30 +0000 Received: from 79-70-81-156.dynamic.dsl.as9105.com ([79.70.81.156] helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1N3sO1-000846-SN for kernel-team@lists.ubuntu.com; Fri, 30 Oct 2009 14:23:29 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] PM: Make warning in suspend_test_finish() less likely to happen Date: Fri, 30 Oct 2009 14:23:28 +0000 Message-Id: <1256912608-24326-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1256912608-24326-1-git-send-email-apw@canonical.com> References: <1256912608-24326-1-git-send-email-apw@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.8 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Rafael J. Wysocki BugLink: http://bugs.launchpad.net/bugs/464552 Increase TEST_SUSPEND_SECONDS to 10 so the warning in suspend_test_finish() doesn't annoy the users of slower systems so much. Also, make the warning print the suspend-resume cycle time, so that we know why the warning actually triggered. Patch prepared during the hacking session at the Kernel Summit in Tokyo. Signed-off-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds (cherry picked from commit 04bf7539c08d64184736cdc5e4ad617eda77eb0f) Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader Acked-by: Leann Ogasawara --- kernel/power/suspend_test.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c index 17d8bb1..25596e4 100644 --- a/kernel/power/suspend_test.c +++ b/kernel/power/suspend_test.c @@ -19,7 +19,7 @@ * The time it takes is system-specific though, so when we test this * during system bootup we allow a LOT of time. */ -#define TEST_SUSPEND_SECONDS 5 +#define TEST_SUSPEND_SECONDS 10 static unsigned long suspend_test_start_time; @@ -49,7 +49,8 @@ void suspend_test_finish(const char *label) * has some performance issues. The stack dump of a WARN_ON * is more likely to get the right attention than a printk... */ - WARN(msec > (TEST_SUSPEND_SECONDS * 1000), "Component: %s\n", label); + WARN(msec > (TEST_SUSPEND_SECONDS * 1000), + "Component: %s, time: %u\n", label, msec); } /*