login
Header Space

 
 

Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 2)

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Rafael J. Wysocki <rjw@...>
Cc: pm list <linux-pm@...>, ACPI Devel Maling List <linux-acpi@...>, Greg KH <greg@...>, Len Brown <lenb@...>, LKML <linux-kernel@...>, Alexey Starikovskiy <astarikovskiy@...>, David Brownell <david-b@...>, Pavel Machek <pavel@...>, Benjamin Herrenschmidt <benh@...>
Date: Saturday, March 22, 2008 - 10:07 pm

On Sun, 23 Mar 2008, Rafael J. Wysocki wrote:


It doesn't help.  What _does_ help is the fact that these traversals 
are all serialized (since only one thread can carry out a system sleep 
at any time).


Yes, that is the problem.  If you try to work around it by using
list_for_each_entry_safe() then you run into a problem when a
concurrent thread removes the device _following_ the one being handled
(or when the device being handled is the last one on the list and a
concurrent thread registers a new device, which can only happen in
dpm_prepare()).

It's not hard to fix.  Just something to be aware of.

Alan Stern

P.S.: Oh yes, another related issue...  We should call get_device() and 
put_device() while holding dpm_list_mtx.  Otherwise the device 
structure might vanish when the callbacks are invoked.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH] PM: Introduce new top level suspend and hiberna..., Rafael J. Wysocki, (Thu Mar 20, 8:01 pm)
Re: [RFC][PATCH] PM: Introduce new top level suspend and hib..., Rafael J. Wysocki, (Sun Mar 23, 5:16 pm)
Re: [RFC][PATCH] PM: Introduce new top level suspend and hib..., Rafael J. Wysocki, (Thu Mar 20, 10:14 pm)
Re: [RFC][PATCH] PM: Introduce new top level suspend and hib..., Rafael J. Wysocki, (Sat Mar 22, 6:17 pm)
Re: [RFC][PATCH] PM: Introduce new top level suspend and hib..., Rafael J. Wysocki, (Sat Mar 22, 7:44 pm)
Re: [RFC][PATCH] PM: Introduce new top level suspend and hib..., Alan Stern, (Sat Mar 22, 10:07 pm)
Re: [RFC][PATCH] PM: Introduce new top level suspend and hib..., Rafael J. Wysocki, (Sun Mar 23, 2:41 pm)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Tue Mar 25, 5:49 am)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Rafael J. Wysocki, (Tue Mar 25, 9:06 am)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Tue Mar 25, 9:15 am)
Re: [linux-pm] , Alan Stern, (Tue Mar 25, 10:19 am)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Tue Mar 25, 10:24 am)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Tue Mar 25, 3:48 pm)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Rafael J. Wysocki, (Tue Mar 25, 4:41 pm)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Tue Mar 25, 4:49 pm)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Rafael J. Wysocki, (Tue Mar 25, 4:56 pm)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Wed Mar 26, 10:24 am)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Oliver Neukum, (Wed Mar 26, 11:42 am)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level , Rafael J. Wysocki, (Wed Mar 26, 4:46 pm)
Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level susp..., Rafael J. Wysocki, (Thu Mar 20, 8:26 pm)
speck-geostationary