Re: [RFC] Add the "icebox"

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

 



On Mon, 5 Nov 2007, Rafael J. Wysocki wrote:

> On Monday, 5 of November 2007, Alan Stern wrote:
> > Rafael:
> > 
> > This patch adds the icebox, for use by kernel threads that want to 
> > freeze themselves without using the freezer -- which is likely to crop 
> > up when the freezer gets eliminated.
> > 
> > It's straightforward enough.  It could be used as-is, for example for 
> > freezing workqueue threads.  Using it for other sorts of kernel threads 
> > seems to be rather difficult, requiring a fair amount of extra code 
> > that's hard to centralize since each thread will have to be woken up 
> > its own way.
> > 
> > Do you have any particular suggestions?
> 
> I like the idea, but I think that start_icebox() should be called after
> freeze_processes().  Similarly, IMO it's better to call stop_icebox() before
> thaw_processes().

The same thought occurred to me.  But consider: If at some point we do 
remove the freezer, then freezable kernel threads will rely on the 
PM_HIBERNATION_PREPARE notification to know when they should go into 
the icebox.  Hence the icebox has to be started before the 
notifications are sent, and that means before freeze_processes.  (In 
fact, once the freezer is gone it won't even make sense to ask whether 
start_icebox comes before or after freeze_processes!)

The experience of working on this has made we wonder whether we really 
should get rid of the freezer entirely.  Even if it is kept merely for 
freezing the handful of kernel threads (not user tasks!) that want to 
be frozen, it's still likely to be more efficient that having a bunch
of independent notifier routines, each sending a particular thread to 
the icebox.  If we do keep the freezer then maybe it's okay to start 
the icebox after the notications are sent.

Alan Stern

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux