public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
[parent not found: <200801020032.45529.rjw@sisk.pl>]
* [PATCH 0/4] PM: Do not destroy/create devices while suspended (rev. 2)
@ 2008-01-01 23:32 Rafael J. Wysocki
  0 siblings, 0 replies; 25+ messages in thread
From: Rafael J. Wysocki @ 2008-01-01 23:32 UTC (permalink / raw)
  To: pm list
  Cc: Greg KH, LKML, ACPI Devel Maling List, Pavel Machek,
	Andrew Morton, Ingo Molnar

Hi,

Some device drivers register CPU hotplug notifiers and use them to destroy
device objects when removing the corresponding CPUs and to create these objects
when adding the CPUs back.

Unfortunately, this is not the right thing to do during suspend/hibernation,
since in that cases the CPU hotplug notifiers are called after suspending
devices and before resuming them, so the operations in question are carried
out on the objects representing suspended devices which shouldn't be
unregistered behing the PM core's back.  Although right now it usually doesn't
lead to any practical complications, it will predictably deadlock if
gregkh-driver-pm-acquire-device-locks-prior-to-suspending.patch is applied.

The solution is to prevent drivers from removing/adding devices from within
CPU hotplug notifiers during suspend/hibernation using the FROZEN bit
in the notifier's action argument.  However, this has to be done with care,
since the devices objects related to the nonboot CPUs that failed to go online
during resume should not be present in the system.  For this reason, it seems
reasonable to introduce a mechanism allowing drivers to ask the PM core to
remove device objects corresponding to suspended devices on their behalf.

The first patch in the series introduces such a mechanism.  The remaining three
patches modify the MSR, x86-64 MCE and cpuid drivers in accordance with the
above approach.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2008-01-12 11:25 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080112005619.GA4665@suse.de>
2008-01-12  3:11 ` [PATCH 0/4] PM: Do not destroy/create devices while suspended (rev. 2) Alan Stern
     [not found] ` <Pine.LNX.4.44L0.0801112208030.21411-100000@netrider.rowland.org>
2008-01-12  3:15   ` Andi Kleen
2008-01-12  3:21   ` Andrew Morton
2008-01-12  4:29   ` Greg KH
     [not found]   ` <20080112042946.GA30093@suse.de>
2008-01-12 11:25     ` Rafael J. Wysocki
     [not found] <200801020032.45529.rjw@sisk.pl>
2008-01-02 10:52 ` Ingo Molnar
     [not found] ` <20080102105217.GA14731@elte.hu>
2008-01-02 12:56   ` Rafael J. Wysocki
     [not found]   ` <200801021356.59865.rjw@sisk.pl>
2008-01-02 13:15     ` Ingo Molnar
     [not found]     ` <20080102131529.GA32160@elte.hu>
2008-01-02 13:28       ` Rafael J. Wysocki
2008-01-02 14:55       ` Kay Sievers
     [not found]       ` <3ae72650801020655h6ec31ce8n5cd9014c00c9f6ad@mail.gmail.com>
2008-01-02 16:01         ` Ingo Molnar
     [not found]         ` <20080102160137.GA21046@elte.hu>
2008-01-02 17:54           ` David Brownell
     [not found]           ` <20080102175400.3C2E0EF588@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-01-02 18:05             ` Alessandro Zummo
     [not found]             ` <20080102190537.2fc735fe@i1501.lan.towertech.it>
2008-01-02 18:12               ` David Brownell
     [not found]               ` <20080102181254.3469E28CE0F@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-01-02 18:34                 ` Alessandro Zummo
2008-01-02 20:14             ` Ingo Molnar
     [not found]             ` <20080102201451.GC3985@elte.hu>
2008-01-02 20:29               ` David Brownell
2008-01-02 17:26       ` David Brownell
     [not found]       ` <20080102172625.CE0C2F6DFE@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
2008-01-02 20:17         ` Ingo Molnar
     [not found]       ` <200801021428.25164.rjw@sisk.pl>
2008-01-03 10:56         ` Pavel Machek
2008-01-12  0:46 ` Andrew Morton
     [not found] ` <20080111164613.7791bb94.akpm@linux-foundation.org>
2008-01-12  0:49   ` Andrew Morton
     [not found]   ` <20080111164904.3ca81602.akpm@linux-foundation.org>
2008-01-12  0:56     ` Greg KH
2008-01-12 11:20     ` Rafael J. Wysocki
2008-01-01 23:32 Rafael J. Wysocki

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