lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Change behaviour when tracing ... nasty trap (was Re: [PATCH] PM/Trace: get rid of synchronous resume limit during PM trace)
Date
Hello Pavel,

> -----Original Message-----
> From: Pavel Machek [mailto:pavel@ucw.cz]
> Sent: Monday, January 26, 2015 6:24 PM
> To: Fu, Zhonghui
> Cc: Rafael J. Wysocki; Brown, Len; Greg Kroah-Hartman;
> linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Liu, Chuansheng
> Subject: Change behaviour when tracing ... nasty trap (was Re: [PATCH]
> PM/Trace: get rid of synchronous resume limit during PM trace)
>
> On Mon 2015-01-26 13:07:03, Fu, Zhonghui wrote:
> > >From f9c841d1f943d81b5ab0aac7483e794a7f966296 Mon Sep 17 00:00:00
> 2001
> > From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> > Date: Mon, 26 Jan 2015 11:27:08 +0800
> > Subject: [PATCH] PM/Trace: get rid of synchronous resume limit during PM
> trace
> >
> > There are some kind of dependency between devices in some
> > hardware platforms. So, asynchronous resuming devices may
> > hang system due to wrong resume order. As a result, should
> > not fore synchronously resuming devices during tracing
> > PM events.
> >
> > Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> > ---
> > drivers/base/power/main.c | 3 +--
> > include/linux/resume-trace.h | 7 -------
> > 2 files changed, 1 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > index 9717d5f..5df148b 100644
> > --- a/drivers/base/power/main.c
> > +++ b/drivers/base/power/main.c
> > @@ -517,8 +517,7 @@ static int device_resume_noirq(struct device *dev,
> pm_message_t state, bool asyn
> >
> > static bool is_async(struct device *dev)
> > {
> > - return dev->power.async_suspend && pm_async_enabled
> > - && !pm_trace_is_enabled();
> > + return dev->power.async_suspend && pm_async_enabled;
> > }
> >
>
> Actually... whoever did the original patch was evil person. Changing
> behaviour when tracing is requested is evil, evil, evil. Git blame
> tells me
>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
>
> went to the dark side.

Although I didn't get where is something wrong, but the is_async() is not created by my commit,
it is from commit (PM: Start asynchronous resume threads upfront), I just moved it ahead.

And like other phases, I added it into resum/suspend_noirq()...


\
 
 \ /
  Last update: 2015-01-26 12:01    [W:0.120 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site