Re: [PATCH v1 2/2] USB: set hub's default autosuspend delay as 0

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

 



On Tue, 25 Sep 2012, Ming Lei wrote:

> > But think of it this way: Suppose there's no driver for a particular
> > device.  Its autosuspend delay will get set to the default initially
> > and then there won't be any driver to change it.  So when would the
> > delay be changed to 0?
> 
> How about just keeping the default delay for this device?

Then we should also keep the default delay (or the existing delay if
it's different from the default) for all devices.

> > I'm not sure that this is something the kernel needs to worry about.
> > Userspace can easily set the default delay to 0 whenever it wants to.
> > This won't affect devices that are already plugged in... but userspace
> > can also set the delays for those devices whenever it wants to.
> 
> If we can do it in kernel safely and consistently, looks not necessary to
> bother userspace.

But our current userspace interface has this module parameter.  I 
don't think we should start ignoring it.  We aren't supposed to change 
existing user interfaces.

This is really a matter of policy -- how long to wait before
autosuspending unbound devices.  Policy should be decided by userspace,
not by the kernel.  If the user's power management code wants to save
CPU power by autosuspending devices immediately, it can do so.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux