Re: Questions about run time power management

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

 



 
Hi ALan,
 
1) As you mentioned that -EBUSY code is appropriate, But if the
device started doing activities during that time then it is not appropriate
to check every time if device is idle.
 
Because if -EBUSY is returned, then workqueue thread will check again and again
that if the device is idle.
 
        if (notify)
                __pm_runtime_idle(dev);

That is notify flag will be true. right?
 
2) The 2nd thing is use case of deep sleep state i.e. system suspend.
 
Suppose device is active and its run time status is active. Now when the system suspend
happens, it will increment usage_counter of device in power management framework,
 
now at that time since clocks and power are enabled, So what will device do?
 
My point is when system suspend comes to device and device is doing activities at that time,
if the device will ask run time power management to shut its clock off and make it suspended,
 
and then it respond to system suspend????
 
Run time power management will not do at the time as its usage counter is already increased,
 
Right? so what about this use case when this kind of overlapping occurs?
 
Regards
Raj 
 
 
 
 

 
> Date: Sun, 25 Jul 2010 11:48:34 -0400
> From: stern@xxxxxxxxxxxxxxxxxxx
> To: rajkumar278@xxxxxxxxxxx
> CC: linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [linux-pm] Questions about run time power management
>
> On Sat, 24 Jul 2010, Raj Kumar wrote:
>
> > Hi Alan,
> >
> >
> >
> > Please see my following points:
> >
> >
> >
> > Suppose when device is idle, it says to run time power management framework i am idle
> >
> > and run time power management asks the device's bus (if bus is being used), and
> >
> > probably the case is if the device does not want to get suspended because of the starting
> >
> > of the activities immediately , it will return the error to platform bus and platform bus returns this error
> >
> > to run time power management framework and run time power management will make
> >
> > the device status active. In the code of
> >
> >
> >
> > int __pm_runtime_suspend(arguments...)
> >
> > {
> >
> >
> >
> >
> > if (retval) {
> > dev->power.runtime_status = RPM_ACTIVE;
> > pm_runtime_cancel_pending(dev);
> >
> > if (retval == -EAGAIN || retval == -EBUSY) {
> > notify = true;
> > dev->power.runtime_error = 0;
> > }
> > } else {
> >
> >
> >
> >
> > }
> >
> >
> >
> > So if the retval is -EAGAIN and -EBUSY, so it means it will again try to make it idle but if the device is
> >
> > already doing activities , since it is started doing activities then in that case is this error code
> >
> > ECANCELED is appropriate?
>
> No. -EBUSY is more appropriate, since the device is busy.
>
> 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