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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday, 23 of March 2008, Alan Stern wrote:
> On Sat, 22 Mar 2008, Rafael J. Wysocki wrote:
> 
[--snip--]
> 
> No, you have missed the entire point.  The problem doesn't exist in the
> current code; it exists only if we switch over to using a single list.  
> Routines like dpm_suspend() won't be able to use list_for_each_entry()
> to traverse the list because entries may be removed by other threads
> during the traversal.  Even list_for_each_entry_safe() won't work
> correctly without careful attention to details.

Ah, ok.  Thanks for the clarification.

Doesn't it help that we traverse the list under dpm_list_mtx?  Anyone who
removes an entry is required to take dpm_list_mtx that we're holding while
the list is traversed except when the callbacks are invoked.

The only problem I see is when the device currently being handled is removed
from the list by a concurrent thread.  Is that you were referring to?

Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux