From: Pavel Machek <pavel@ucw.cz>
To: James Hogan <james@albanarts.com>, Greg KH <greg@kroah.com>
Cc: linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
Len Brown <len.brown@intel.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Randy Dunlap <rdunlap@xenotime.net>,
Greg Kroah-Hartman <gregkh@suse.de>,
Alan Stern <stern@rowland.harvard.edu>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
markgross <markgross@thegnar.org>
Subject: Re: [PATCH 2/2] pm_trace: Add sysfs attr for rechecking dev hash.
Date: Sun, 10 Oct 2010 22:47:19 +0200 [thread overview]
Message-ID: <20101010204719.GA3388@elf.ucw.cz> (raw)
In-Reply-To: <201010102047.01950.james@albanarts.com>
On Sun 2010-10-10 20:47:01, James Hogan wrote:
> Hi Pavel,
>
> On Sunday 10 October 2010 19:04:00 Pavel Machek wrote:
> > Hi!
> >
> > > If the device which fails to resume is part of a loadable kernel module
> > > it won't be checked at startup against the magic number stored in the
> > > RTC.
> > >
> > > Add a read-only sysfs attribute /sys/power/pm_trace_dev_hash which
> > > contains a list of newline separated devices (usually just the one)
> > > which currently match the last magic number. This allows the device
> > > which is failing to resume to be found after the modules are loaded
> > > again.
> > >
> > > --- a/Documentation/power/s2ram.txt
> > > +++ b/Documentation/power/s2ram.txt
> > >
> > > @@ -49,6 +49,13 @@ machine that doesn't boot) is:
> > > device (lspci and /sys/devices/pci* is your friend), and see if you
> > > can fix it, disable it, or trace into its resume function.
> > >
> > > + If no device matches the hash, it may be a device from a loadable
> > > kernel + module that is not loaded until after the hash is checked.
> > > You can check + the hash against the current devices again after more
> > > modules are loaded + using sysfs:
> > > +
> > > + cat /sys/power/pm_trace_dev_hash
> > > +
> >
> > Yep, but exact semantics of that sysfs file should probably be linked
> > in the sysfs documentation...
> > Pavel
>
> To clarify, do you mean I should link to Documentation/ABI/testing/sysfs-power
> from Documentation/power/s2ram.txt, or just make sure the syfs file is
> documented in Documentation/ABI/testing/sysfs-power (which is done in v2 of
> this patch)?
v2 of the patch is probably ok.
Also, sysfs should be one entry per file, and strictly speaking, this
one is not. That may be fine... but as this is debugging facility,
perhaps it should go to debugfs? Maybe cc gregkh...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2010-10-10 20:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 22:34 [PATCH 0/2] pm_trace: Add locking and add sysfs attr for rechecking dev hash James Hogan
2010-10-09 22:36 ` [PATCH 1/2] pm_trace: Lock pm device list mutex James Hogan
2010-10-09 22:43 ` Rafael J. Wysocki
2010-10-09 22:37 ` [PATCH 2/2] pm_trace: Add sysfs attr for rechecking dev hash James Hogan
2010-10-09 22:49 ` Rafael J. Wysocki
2010-10-09 23:13 ` James Hogan
2010-10-09 23:30 ` Rafael J. Wysocki
2010-10-10 18:04 ` Pavel Machek
2010-10-10 19:47 ` James Hogan
2010-10-10 20:47 ` Pavel Machek [this message]
2010-10-10 21:19 ` James Hogan
2010-10-10 22:12 ` 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=20101010204719.GA3388@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=james@albanarts.com \
--cc=jbarnes@virtuousgeek.org \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=markgross@thegnar.org \
--cc=rdunlap@xenotime.net \
--cc=rjw@sisk.pl \
--cc=stern@rowland.harvard.edu \
/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