From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: pm list <linux-pm@lists.linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Arjan van de Ven <arjan@infradead.org>
Subject: Re: [PATCH 1/5] PM: Make the initcall_debug style timing for suspend/resume complete
Date: Mon, 21 Dec 2009 23:40:16 +0100 [thread overview]
Message-ID: <200912212340.16279.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0912211612340.3328-100000@iolanthe.rowland.org>
On Monday 21 December 2009, Alan Stern wrote:
> On Mon, 21 Dec 2009, Rafael J. Wysocki wrote:
>
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Commit f2511774863487e61b56a97da07ebf8dd61d7836
> > (PM: Add initcall_debug style timing for suspend/resume) introduced
> > basic timing instrumentation, needed for a scritps/bootgraph.pl
> > equivalent or humans, but it missed the fact that bus types and
> > device classes which haven't been switched to using struct dev_pm_ops
> > objects yet need special handling. As a result, the suspend/resume
> > timing information is only available for devices whose bus types or
> > device classes use struct dev_pm_ops objects, so the majority of
> > devices is not covered.
> >
> > Fix this by adding basic suspend/resume timing instrumentation for
> > devices whose bus types and device classes still don't use struct
> > dev_pm_ops objects for power management. To reduce code duplication
> > move the timing code to helper functions.
>
> A minor complaint...
>
> > +/**
> > * device_resume - Execute "resume" callbacks for given device.
> > * @dev: Device to handle.
> > * @state: PM transition of the system being carried out.
> > @@ -427,7 +465,7 @@ static int device_resume(struct device *
> > error = pm_op(dev, dev->bus->pm, state);
> > } else if (dev->bus->resume) {
> > pm_dev_dbg(dev, state, "legacy ");
> > - error = dev->bus->resume(dev);
> > + error = legacy_resume(dev, dev->bus->resume);
> > }
> > if (error)
> > goto End;
> > @@ -448,7 +486,7 @@ static int device_resume(struct device *
> > error = pm_op(dev, dev->class->pm, state);
> > } else if (dev->class->resume) {
> > pm_dev_dbg(dev, state, "legacy class ");
> > - error = dev->class->resume(dev);
> > + error = legacy_resume(dev, dev->class->resume);
> > }
> > }
>
> If none of the method callbacks are non-NULL, this won't print
> anything. The same is true for device_suspend().
>
> Now maybe you don't _want_ to print anything in that case, but for
> debugging purposes it could be useful.
I'm going to add that in a separate patch.
Rafael
next prev parent reply other threads:[~2009-12-21 22:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-21 21:01 [PATCH 0/5] PM patches for the next pull request Rafael J. Wysocki
2009-12-21 21:03 ` [PATCH 1/5] PM: Make the initcall_debug style timing for suspend/resume complete Rafael J. Wysocki
2009-12-21 21:15 ` Alan Stern
2009-12-21 22:40 ` Rafael J. Wysocki [this message]
2009-12-21 21:04 ` [PATCH 2/5] PM: Measure device suspend and resume times Rafael J. Wysocki
2009-12-21 21:05 ` [PATCH 3/5] PM: Use pm_runtime_put_sync in system resume Rafael J. Wysocki
2009-12-21 21:06 ` [PATCH 4/5] PM / Runtime: Use device type and device class callbacks Rafael J. Wysocki
2009-12-21 21:06 ` [PATCH 5/5] PM: Runtime PM documentation update Rafael J. Wysocki
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=200912212340.16279.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®