Re: [RFC Add in_use attribute] Let the driver know if it's in use

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

 



On Tue, Apr 21, 2009 at 08:33:01PM +0200, Rafael J. Wysocki wrote:
> On Tuesday 21 April 2009, Greg KH wrote:
> > 
> > I seem to not have seen the original post about this, thanks Alan for
> > adding me to the cc:
> > 
> > On Mon, Apr 20, 2009 at 06:11:18PM -0400, Alan Stern wrote:
> > > On Mon, 20 Apr 2009, Rafael J. Wysocki wrote:
> > > 
> > > > On Thursday 16 April 2009, Michael Trimarchi wrote:
> > > > > Drivers on embedded systems would be smart enough
> > > > > to know that some of the devices should remain powered up, because
> > > > > they could still be useful even when the CPU wasn't running.
> > > > > The patch add the in_use attribute, that it can be used by the
> > > > > the drivers to avoid power down during suspend.
> > 
> > I'm confused, why would a driver not know if it was in use or not?
> > Actually, how would it not know already by virtue of what is happening
> > within it (io in flight, buttons being pushed, dma streaming, etc.)?
> > 
> > > > OK, so the idea is that in_use will be set by the user space for devices that
> > > > shouldn't be suspended.  Is this correct?
> > 
> > So userspace knows better than the kernel as to if a specific driver is
> > being used at the moment?  Why is this so?
> 
> The name of the flag is not the best one. :-)
> 
> The flag is supposed to mean "don't suspend this device during system-wide
> suspend, because it's being used for something you may be unaware of".
> AFAICS.

Then it needs to be changed, as it is not obvious at all what is going
on here.  Your "no_suspend" suggestion would be good.

thanks,

greg k-h
_______________________________________________
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