| Submitter | Andy Whitcroft |
|---|---|
| Date | Oct. 30, 2009, 2:23 p.m. |
| Message ID | <1256912608-24326-2-git-send-email-apw@canonical.com> |
| Download | mbox | patch |
| Permalink | /patch/37302/ |
| State | Accepted |
| Headers | show |
Comments
As this is one the most unnecessary warnings we got around and apparently has been annoying upstream too, plus the change is least likely to cause any regression. Andy Whitcroft wrote: > From: Rafael J. Wysocki <rjw@sisk.pl> > > Bug-Link: 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 <rjw@sisk.pl> > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> > (cherry picked from commit 04bf7539c08d64184736cdc5e4ad617eda77eb0f) > > Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- > 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); > } > > /*
On Fri, 2009-10-30 at 14:41 +0000, Stefan Bader wrote: > As this is one the most unnecessary warnings we got around and apparently > has been annoying upstream too, plus the change is least likely to cause > any regression. We're also seeing a huge flood of bug reports due to this warning. Hopefully this patch will cut down the noise. Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com> > Andy Whitcroft wrote: > > From: Rafael J. Wysocki <rjw@sisk.pl> > > > > Bug-Link: 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 <rjw@sisk.pl> > > Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> > > (cherry picked from commit 04bf7539c08d64184736cdc5e4ad617eda77eb0f) > > > > Signed-off-by: Andy Whitcroft <apw@canonical.com> > > Acked-by: Stefan Bader <stefan.bader@canonical.com> > > > --- > > 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); > > } > > > > /* > >
Applied
Patch
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); } /*