From: Pavel Machek <pavel@ucw.cz>
To: Rafa Bilski <rafalbilski@interia.pl>,
kernel list <linux-kernel@vger.kernel.org>,
Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: [PATCH] Longhaul - call suspend(PMSG_FREEZE) before and resume() after
Date: Sun, 28 May 2006 07:16:22 +0000 [thread overview]
Message-ID: <20060528071622.GA4108@ucw.cz> (raw)
In-Reply-To: <4478D319.2030707@interia.pl>
Hi!
> I posted this to Dave Jones, but:
> > This really should also get posted to linux-kernel, though I don't
> > think people are going to be particularly enthusiastic about exposing
> > these innards to modules.
> So I'm posting this patch here too. I'm not subscribed to this list.
> If You wish email me.
> Minor change: preempt_disabled() goto_sleep_pci() and wakeup_pci()
> causes "sheduling while atomic". So in this patch below it isn't
> preempt_disabled(). But I think that this should be protected
> in some way.
Well, suspend/resume is normally called during system suspend/resume,
so it has 'interesting' locking requirements.
> How it works:
> 1. Call suspend(PMSG_FREEZE) for each block device.
> 2. Call suspend(PMSG_FREEZE) for each PCI device.
> 3. Change CPU frequency.
> 4. Call resume() for each PCI device.
> 5. Call resume() for each block device.
>
> Result: No more broken DMA transfers caused by frequency change.
Result: system hang if userspace tries to do request at the same time
-- PCI drivers probably were not designed for _that_... but we
probably want to fix them, anyway, so this is probably ok (but expect
to do some driver debugging).
But you should really add that preempt_disable and not try this on smp
system...
Pavel
--
Thanks for all the (sleeping) penguins.
next prev parent reply other threads:[~2006-05-28 7:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-27 22:30 [PATCH] Longhaul - call suspend(PMSG_FREEZE) before and resume() after Rafał Bilski
2006-05-28 7:16 ` Pavel Machek [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-05-28 11:38 [ PATCH ] " Rafa? Bilski
2006-05-28 14:56 ` Dave Jones
2006-05-28 16:23 ` Rafał Bilski
2006-05-28 14:42 [PATCH] " Rafał Bilski
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=20060528071622.GA4108@ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=rafalbilski@interia.pl \
/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