linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Fu, Zhonghui" <zhonghui.fu@linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	len.brown@intel.com,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PM / sleep: cancel the synchronous restriction of pm-trace
Date: Wed, 20 May 2015 15:45:05 +0200	[thread overview]
Message-ID: <20150520134505.GA1479@amd> (raw)
In-Reply-To: <555C4AC5.4080901@linux.intel.com>

> >> -#define TRACE_DEVICE(dev) do { \
> >> +#define TRACE_DEVICE_START(dev) do { \
> >>  	if (pm_trace_enabled) \
> >> +		mutex_lock(&pt_mutex); \
> >>  		set_trace_device(dev); \
> >>  	} while(0)
> >>  
> >> +#define TRACE_DEVICE_END() \
> >> +do { \
> >> +	if (pm_trace_enabled) { \
> >> +		mutex_unlock(&pt_mutex); \
> >> +	} \
> >> +} while (0)
> >> +
> > Won't this serialize the whole thing again?
> Yes, this mutex lock will ultimately serialize all PM operations. But, all device's PM operations are asynchronous each other at first. So, the PM operation order of all devices will vary in multiple suspend/resume. This can be similar to real to an extreme, and helpful to debugging.
> 

I believe the tradeoff here is wrong. Just keep PM_TRACE simple, and
use something else for a real tricky failures..
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2015-05-20 13:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-06 14:47 [PATCH] PM / sleep: cancel the synchronous restriction of pm-trace Fu, Zhonghui
2015-05-16  0:45 ` Rafael J. Wysocki
2015-05-20  8:50   ` Fu, Zhonghui
2015-05-20 13:45     ` Pavel Machek [this message]
2015-05-21  1:16     ` Rafael J. Wysocki
2015-05-28 14:43       ` Fu, Zhonghui
2015-06-15  5:32         ` Fu, Zhonghui
2015-06-15 23:05           ` Rafael J. Wysocki
2015-05-18  6:33 ` Fu, Zhonghui
2015-05-19  0:38   ` Rafael J. Wysocki
2015-05-20  8:57     ` Fu, Zhonghui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150520134505.GA1479@amd \
    --to=pavel@ucw.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=zhonghui.fu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).