Re: [GIT PATCH] USB autosuspend fixes for 2.6.23-rc6

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

 



On Thu, 13 Sep 2007, Adrian Bunk wrote:

> > These two patches address the need today to have users machines still
> > work, even if they might draw more power than they possibly could (which
> > is not any more than they did in 2.6.22.)
> > 
> > These patches do two things:
> >   - disable USB autosuspend on all devices except for USB hubs.  This
> >     can be easily overridden by userspace to turn on autosuspend for
> >     devices that a user wants to.  HAL will use a whitelist in the
> >     future for these types of devices.
> >...
> 
> Not related to the patch for 2.6.23, but I have a gut feeling that 
> something might be done the wrong way later:
> 
> If I understand you correctly, you are saying that I will have to 
> install HAL for getting a whitelist for in-kernel functionality?

Your meaning isn't entirely clear.  Presumably HAL will contain such a 
whitelist.  But there's nothing to stop you from setting up your own 
whitelist via udev scripts, or even turning autosuspend on or off by 
hand.

> It is a good thing if userspace can add currently missing devices to
> whitelists, but the whitelist itself should be in the kernel.

It's not clear that this sort of approach will turn out to be workable.  
Whitelists/blacklists do okay in the kernel when they refer to a 
relatively small subset of devices.  However in this case I have the 
impression that we're talking about roughly a 50/50 split.  Keeping an 
in-kernel list with even 10% of all existing USB devices simply isn't 
feasible.

Besides, is it really that much harder for userspace to modify device
settings as the devices are detected than for it to modify an in-kernel
whitelist just once?  Don't forget about possible races: Devices may
already have been detected and configured before userspace was able to
modify the whitelist.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux