[linux-pm] Re: Hotplug events during sleep transition

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

 



On Pá 23-12-05 16:22:44, Alan Stern wrote:
> On Fri, 23 Dec 2005, Pavel Machek wrote:
> 
> > Well, if you can find some elegant solution in the core, I think thats
> > the best way.
> > 
> > You could set system_state to "suspending" or something like that, and
> > just if() out notifications in that case.
> 
> How about simply adding a call to try_to_freeze() somewhere inside 
> kernel/kmod.c:____call_usermodehelper()?  That ought to do pretty much 
> what I want, in theory.  The hotplug processes would get frozen before 
> /sbin/hotplug is exec'ed.
> 
> I haven't actually tried it yet, so maybe there's a hidden gotcha.

That would mean quite a lot of "extra" events delivered to userspace,
no?  ... no, actually not, that should be okay. "resume during
suspend" events will be discarded, because they'll not make it into
on-disk image, so userspace will get single unplug/replug events after
resume. That's okay.

OTOH I do not think try_to_freeze() is going to make it. Process
freezing is one-time action, so if you start new thread,
try_to_freeze() will not attempt to freeze it.
							Pavel
-- 
Thanks, Sharp!

[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