linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ShuoX Liu <shuox.liu@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: yanmin_zhang@linux.intel.com,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	pavel@ucw.cz, len.brown@intel.com
Subject: Re: [PATCH 0/2] Run callback of device_prepare/complete consistently
Date: Sun, 09 Jun 2013 16:11:10 +0800	[thread overview]
Message-ID: <51B4389E.8050501@intel.com> (raw)
In-Reply-To: <1848832.IkLoHNGzvs@vostro.rjw.lan>

On 2013-06-08 18:54, Rafael J. Wysocki wrote:

> On Saturday, June 08, 2013 10:37:18 AM Yanmin Zhang wrote:
>> On Sat, 2013-06-08 at 03:52 +0200, Rafael J. Wysocki wrote:
>>> On Saturday, June 08, 2013 09:36:03 AM Yanmin Zhang wrote:
>>>> On Sat, 2013-06-08 at 03:30 +0200, Rafael J. Wysocki wrote:
>>>>> On Friday, June 07, 2013 06:16:25 PM Greg KH wrote:
>>>>>> On Sat, Jun 08, 2013 at 08:42:12AM +0800, Yanmin Zhang wrote:
>>>>>>> On Fri, 2013-06-07 at 12:36 +0200, Rafael J. Wysocki wrote:
>>>>>>>> On Friday, June 07, 2013 04:20:30 PM shuox.liu@intel.com wrote:
>>>>>>>>> dpm_run_callback is used in other stages of power states changing.
>>>>>>>>> It provides debug info message and time measurement when call these
>>>>>>>>> callback. We also want to benefit ->prepare and ->complete.
>>>>>>>>>
>>>>>>>>> [PATCH 1/2] PM: use dpm_run_callback in device_prepare
>>>>>>>>> [PATCH 2/2] PM: add dpm_run_callback_void and use it in device_complete
>>>>>>>>
>>>>>>>> Is this an "Oh, why don't we do that?" series, or is it useful for anything
>>>>>>>> in practice?  I'm asking, because we haven't added that stuff to start with
>>>>>>>> since we didn't see why it would be useful to anyone.
>>>>>>>>
>>>>>>>> And while patch [1/2] reduces the code size (by 1 line), so I can see some
>>>>>>>> (tiny) benefit from applying it, patch [2/2] adds more code and is there any
>>>>>>>> paractical reason?
>>>>>>> Sometimes, suspend-to-ram path spends too much time (either suspend slowly
>>>>>>> or wakeup slowly) and we need optimize it.
>>>>>>> With the 2 patches, we could collect initcall_debug printk info and manually
>>>>>>> check what prepare/complete callbacks consume too much time.
>>>>>>
>>>>>> But initcall information is for initialization stuff, not suspend/resume
>>>>>> things, right?  Doesn't the existing tools for parsing this choke if it
>>>>>> sees the information at suspend/resume time?
>>>>>
>>>>> We've been using that for suspend/resume for quite some time too, but not
>>>>> for the prepare/complete phases (because we still believe that's not really
>>>>> useful for them). 
>>>>>
>>>>> Well, I'll be handling patches changing code under drivers/base/power,
>>>>> I promise. :-)
>>>>>
>>>>> I've been doing that for quite a few years now ...
>>>> Yes, indeed. Power is one of the most important features on embedded devices.
>>>> Lots of smart phones don't really go through the full cycles of suspend-to-ram.
>>>> We are following the full steps of the suspend.
>>>
>>> But if you go through the code, you'll see that alomost no drivers actually
>>> implemet .prepare() and .complete().  Some subsystems do, but they really don't
>>> take too much time to execute.  Which means that your patches with
>>> initcall_debug will add quite a pile of useless garbage to the kernel log
>> Does that mean we need add more log levels around such info instead of just having or
>> not having?
> 
> Since we don't have any code in the tree that causes problems those patches are
> supposed to catch, I don't see why we need them in the tree.  Would it be
> viable to keep them out of the tree for the time being and re-submit once
> there is real need?

It's OK with me. I will keep them in my debug tree.
Thanks all.

Shuo

  reply	other threads:[~2013-06-09  8:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07  8:20 [PATCH 0/2] Run callback of device_prepare/complete consistently shuox.liu
2013-06-07  8:20 ` [PATCH 1/2] PM: use dpm_run_callback in device_prepare shuox.liu
2013-06-07 17:37   ` Greg KH
2013-06-08  0:43     ` Yanmin Zhang
2013-06-08  1:15       ` Greg KH
2013-06-08  1:21         ` Yanmin Zhang
2013-06-07  8:20 ` [PATCH 2/2] PM: add dpm_run_callback_void and use it in device_complete shuox.liu
2013-06-07 17:38   ` Greg KH
2013-06-07 10:36 ` [PATCH 0/2] Run callback of device_prepare/complete consistently Rafael J. Wysocki
2013-06-08  0:42   ` Yanmin Zhang
2013-06-08  0:54     ` Rafael J. Wysocki
2013-06-08  1:17       ` Yanmin Zhang
2013-06-08  1:25         ` Rafael J. Wysocki
2013-06-08  1:16     ` Greg KH
2013-06-08  1:30       ` Rafael J. Wysocki
2013-06-08  1:36         ` Yanmin Zhang
2013-06-08  1:52           ` Rafael J. Wysocki
2013-06-08  2:37             ` Yanmin Zhang
2013-06-08 10:54               ` Rafael J. Wysocki
2013-06-09  8:11                 ` ShuoX Liu [this message]
2013-06-08  1:30       ` Yanmin Zhang
2013-06-10 11:50   ` Pavel Machek

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=51B4389E.8050501@intel.com \
    --to=shuox.liu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=yanmin_zhang@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).