Re: Question about timers during system suspend

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

 



On Wednesday, January 05, 2011, Raj Kumar wrote:
> 
> Dear rafael,
>  
> Thanks for quick reply.
>  
> >> I have question regarding the timers during system suspend. If a software timer is
> > > active in device driver, will this timer be stopped during system suspend?
> >
> > What do you mean by "stopped"? Do you mean canceled?
>  
> I mean cancel the software timer. But if the software timer is active as you
> already mentioned it will not prevent system suspend. I mean to say if the
> driver has active software timer means software timer is not fired yet and
> device driver will return from suspend callback without cancelation software
> timer and it times out after this will not prevent system suspend to return
> error code.

I'm not really sure what you mean.  If the timer expires right after the
suspend routine has returned, then either the timer function will run
immediately (so you need to take that into consideration), if the timer
interrupt is still enabled at this point, or it will run during resume
(asynchronously with respect to the driver's resume routine).

> right??
>  
> or is it mandatory to cancel the software timer during suspend callback to device driver?

I guess it's better to cancel the timer directly from the suspend routine, but
it is not formally required to do so.

Thanks,
Rafael

 
> ----------------------------------------
> > From: rjw@xxxxxxx
> > To: rajkumar278@xxxxxxxxxxx
> > Subject: Re:  Question about timers during system suspend
> > Date: Wed, 5 Jan 2011 00:05:42 +0100
> > CC: linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
> >
> > On Tuesday, January 04, 2011, Raj Kumar wrote:
> > >
> > > Hi,
> >
> > Hi,
> >
> > > I have question regarding the timers during system suspend. If a software timer is
> > > active in device driver, will this timer be stopped during system suspend?
> >
> > What do you mean by "stopped"? Do you mean canceled?
> >
> > > If the timer is active, will it prevent the system from full suspend?
> >
> > No, it won't.
> >
> > > The another thing is during system suspend, how the user space code know about suspend?
> >
> > It doesn't, unless it's notified by the user space process initiating suspend.
> >
> > > One way is that device driver gets the suspend and it notifies the user space.
> >
> > That doesn't work, because user space is frozen when drivers' suspend routines
> > are being called. It might work if the driver in question registered a power
> > management notifier and sent a notification to user space from there.
> >
> > > But is there way that during system goes into full suspend, is any user space component that will
> > > give notifications to applications that has registered for system suspend transition?
> >
> > That depends on the configuration of user space. pm-utils can do that for one
> > example.
> >
> > Thanks,
> > Rafael 		 	   		  
> 

_______________________________________________
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