public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Longhaul - call suspend(PMSG_FREEZE) before and resume() after
       [not found] <4478D319.2030707@interia.pl>
@ 2006-05-28  7:16 ` Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2006-05-28  7:16 UTC (permalink / raw)
  To: Rafa Bilski, kernel list, Linux-pm mailing list

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-28  7:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4478D319.2030707@interia.pl>
2006-05-28  7:16 ` [PATCH] Longhaul - call suspend(PMSG_FREEZE) before and resume() after Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox